Thread: Dev C++ 4 and GCC

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    3

    Dev C++ 4 and GCC

    I have been trying to make a c program and I was told to download these two programs. I downloaded and installed Dev C++ with no problems but have searched the net endlessly to figure out how to install GCC but can't figure it out. Does anyone know how to do it or know of a link to a tutorial which could help me out?

  2. #2
    The larch
    Join Date
    May 2006
    Posts
    3,573
    It should be possible to download and install Dev-C++ together with GCC and have it run from the box. So you wouldn't need to do anything special. Hopefully by Dev-C++ 4 you mean something like 4.9.9.2 (which I guess is also called Dev-C++ 5), otherwise you might have many troubles.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Or you can just download Visual Studio Express and not have to worry about configuring n' stuff. Nice.
    Assuming you're using Windows, of course. Wouldn't work on Linux or Mac.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    DevC++ comes with MingW (The Windows port of GCC), what exactly are you trying to do?

    > Assuming you're using Windows, of course. Wouldn't work on Linux or Mac.
    Wine ftw

  5. #5
    Registered User
    Join Date
    Jan 2008
    Posts
    3
    I want to be able to use gcc commands in command window to compile the .o files and run, my friend told me I had to download gcc in addition to dev c++ to do this, maybe he's wrong?

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Why in blazes would anyone want to do that? That is beyond my knowledge.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    He's partly right, you want MinGW -- the Windows GCC port.

    However, you've already got MinGW (DevCpp comes with it), look in DevCpp's bin directory (or whatever it's called).

  8. #8
    Beautiful to C Aia's Avatar
    Join Date
    Jun 2007
    Posts
    124
    Quote Originally Posted by zacs7 View Post
    He's partly right, you want MinGW -- the Windows GCC port.

    However, you've already got MinGW (DevCpp comes with it), look in DevCpp's bin directory (or whatever it's called).
    Adding to that.
    If you installed Dev-C++ in the default place, all you need to do is to set the path.
    Control panel->System->Advanced->Environment Variables

    Evironment Variables->bottom screen->select Path->click Edit.
    In the new Edit System Variable window->enter-> ;C:\Dev-Cpp\bin ( note the semicolon )
    click OK
    click Ok
    To test that gcc is working anywhere in the command line:
    Run->cmd.exe
    At the command line enter gcc -v
    Something similar to this indicates the path is set correctly:

    C:\AllProg\CProg\helping>gcc -v
    Reading specs from C:/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/specs
    Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=
    mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable
    -languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --e
    nable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-ja
    va-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchroniz
    ation --enable-libstdcxx-debug
    Thread model: win32
    gcc version 3.4.2 (mingw-special)
    Now you can compile using commands.

  9. #9
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Why in blazes would anyone want to do that? That is beyond my knowledge.
    Possible reasons include:
    • To run a build tool like make or scons from the command line (possibly due to lack of IDE support).
    • To run a configure script from MSYS.
    • To learn how to use gcc from the command line.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed