Thread: gcc compiler?

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    12

    gcc compiler?

    ok for a program i have to do for my class i have to make it ansi-c compliant and make sure it will run on a unix os. my teacher said to accomplish this by using a gcc compiler which he had on his website, which just so happend to crash. so does anyone know where i can get a gcc compiler? thanx alot

  2. #2
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    The world is waiting. I must leave you now.

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    What OS are you running? Have you considered using a search engine?

    Here is a tip: Use only ANSI compliant functions and it should compile without any problem on virtually any newer C compiler out there. (Assuming your teacher isn't an idiot who tries compiling C as C++.)

    Quzah.
    Hope is the first step on the road to disappointment.

  4. #4
    Registered User
    Join Date
    Feb 2002
    Posts
    12
    i tried using a search engine, but i never could find anything. i just kept going in circles, and i figured it would probably be quicker to ask people who know about this kind of thing. and i looked at the compilers in the faq, and clicked on the mingw32 one, but i have no idea what to download, there's so much there. and none of it makes sense

    oh, and on our last project, i really think we did use ansi-c compliant functions, it worked fine on microsoft visual studio. but when the teacher compiled it on his unix os with a gcc, it didn't work right, so i don't know.
    Last edited by BR7; 04-25-2002 at 10:20 PM.

  5. #5
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    > i have no idea what to download, there's so much there. and none of it makes sense
    Hmm.

    > a program i have to do for my class i have to make it ansi-c compliant and make sure it will run on a unix os.

    And you expect to do that?

    Good luck.
    The world is waiting. I must leave you now.

  6. #6
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    You still haven't answered my first question. What operating system are you using? Perhaps cygwin will work for your needs.

    Quzah.
    Hope is the first step on the road to disappointment.

  7. #7
    Registered User
    Join Date
    Feb 2002
    Posts
    12
    whops sorry, i'm using windows ME

  8. #8
    Registered User
    Join Date
    Feb 2002
    Posts
    12
    Originally posted by Shadow
    > i have no idea what to download, there's so much there. and none of it makes sense
    Hmm.

    > a program i have to do for my class i have to make it ansi-c compliant and make sure it will run on a unix os.

    And you expect to do that?

    Good luck.
    you actually prove a good point, AN INTRO TO PROGRAMMING CLASS SHOUD NOT BE THIS HARD!! this guy expects WAY too much out of us

  9. #9
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Originally posted by BR7


    you actually prove a good point, AN INTRO TO PROGRAMMING CLASS SHOUD NOT BE THIS HARD!! this guy expects WAY too much out of us
    Actually it isn't hard at all. Use ANSI standard library functions and you will have no problems what so ever. See what he's teaching? Don't use non-standard crap.

    Quzah.
    Hope is the first step on the road to disappointment.

  10. #10
    Registered User
    Join Date
    Feb 2002
    Posts
    12
    Originally posted by quzah


    Actually it isn't hard at all. Use ANSI standard library functions and you will have no problems what so ever. See what he's teaching? Don't use non-standard crap.

    Quzah.
    actually he doesn't teach us crap, he just told us to use ansi, he's the worst teacher i've ever had. i learned more from my graduate student lab teacher this semester than i did in the lecture. and the programs are insanely hard. the class of 150 people has an averge grade of 55. actually that number is probably closer to 110-120 since so many people have switched majors because of this guy.

  11. #11
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    The world is waiting. I must leave you now.

  12. #12

  13. #13
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    [h1] OK [/h1]
    gcc is the GNU C COMPILER
    It is meant for Unix-based systems
    because it is open source it is available in all formats for all systems, the problem is it is most likely available as ASM code not C considering they expect you to not have a compiler when you get the code. I am sure someone has some binaries out there somewere but the thing you are experiencing is the fact that it was compiled for a different processor
    probably under some 8086 ASM compiler it was compiled and because asm is always a processor specific languange it may not run on your machine. Try to find some WIN 32 Binaries on gcc
    Google

    I am a Linux user only, so if you have any more questions about Linux ask me, u can read me up through my personal data.

    ----------------------
    The integral is a sum of a finite number of thin strips under the curve as their widths approach the limit of zero. When these strips are all below a curve their sum is called today a "lower Riemann sum" after German mathematician George Friedrich Bernhard Riemann (1826-1866). The same sum can be otained by letting the strips extend above the curve, in which case the sum is called an "upper Riemann sum." If the strips are drawn so that their tops cross the curve, their sum is called a "Riemann sum." Regardless of how the strips are drawn, they will have the same "Riemann integral" at the limit when they became infinite in number and their widths become infinitely small. --Martin Garden
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  14. #14
    Registered User stautze's Avatar
    Join Date
    Apr 2002
    Posts
    195
    If your school doesn't provide it, you could try to find a free shell account. Then you could compile your program ans test it in a UNIX enviroment.

  15. #15
    Unregistered
    Guest
    Another one for the pot:

    http://www.borland.com/bcppbuilder/freecompiler/

    This can do C and C++ I believe. Just try not to mix the 2 in your source!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Quick Compilation Question
    By chacham15 in forum C Programming
    Replies: 10
    Last Post: 10-12-2008, 08:15 PM
  2. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  3. Run time differences in Linux gcc versions
    By circuitbreaker in forum C++ Programming
    Replies: 7
    Last Post: 02-14-2008, 11:09 PM
  4. Dev C++ Compiler, Indentation?
    By Zeusbwr in forum C++ Programming
    Replies: 3
    Last Post: 10-21-2004, 06:13 AM
  5. gcc not for C++?
    By tin in forum C++ Programming
    Replies: 4
    Last Post: 09-15-2004, 08:26 AM