View Full Version : Free C++ compiler 100% ok with GL?
02-18-2004, 02:05 AM
I was wondering if what is the suggested free c/c++ compiler that would work (compile without errors) with OpenGL-based (and even DirectX) projects.
A working link to the download site of the compiler would be appreciated also.
Thanks in advance! http://www.opengl.org/discussion_boards/ubb/smile.gif
02-18-2004, 02:37 AM
For C : PellesC http://www.smorgasbordet.com/pellesc
For C/C++ : DevC++
02-18-2004, 02:45 AM
I tried DevC++ before but had compile problems. I better look at it more closely then.
02-18-2004, 05:24 AM
I use DEV-C++ all the time without any trouble compiling openGL code. nehe has DEV versions of his tutors.
The only thing is that VC++ examples may need some added headers to compile under DEV-C++ But if you want 100% VC++ compatibility, then you will have to break down and buy VC++.
[This message has been edited by nexusone (edited 02-18-2004).]
02-18-2004, 05:29 AM
C++ Builder X (http://www.borland.com/products/downloads/download_cbuilderx.html) has 100% support for OpenGL, and is 100% free (Personal Edition). One drawback...it's a hefty 300+ MB download. But, on the plus side, it comes with two compilers: gcc (from MinGW) and Borland C++ 5.6 Other compilers to take a look at are DevC++ (mentioned above), and MinGW. Both are also free, and might be less of a download, though I can't quote how well they work with OpenGL.
02-18-2004, 01:04 PM
There's always GCC. It's free and open source (GPL). It should be easy to find through Google.
02-18-2004, 02:17 PM
Just a note... Dev-C++ is NOT a compiler, it is an IDE. Dev-C++ uses the MinGW compiler to compile projects, MinGW is Minimalist GNU for Windows, so it is a GNU (ie: GCC/G++) compiler. It is totally free (MinGW and Dev-C++ which comes packaged with MinGW) and it is an optimizing compiler.
If you want a full optimizing version of Visual C/C++ LAGALLY you will have to fork out over $1000 (It was $1200+ last I checked). The cheaper versions do NOT optimize.
You're best bet is to stick to GNU compilers like DJGPP (DOS, but they have a windows version too I guess), MINGW (windows, alone as a command line compiler or with the Dev-C++ IDE, which I recommend), Borland's, which I honestly am not crazy about.
I have built alot of projects with Dev-c++ (MINGW) and I have had zero problems. I have compiled OpenGL, DirectX, Allegro (and AllegroGL) projects... if you have problems it is more than likely because you forgot to tell Dev-C++ to link in the proper libraries. I have imported Visual C projects into Dev-C++ and compiled them with no changes other than telling Dev-c++ which libs were needed. The best part about Dev-C++ is you can spend the $1200 you save on a new computer to compile with. http://www.opengl.org/discussion_boards/ubb/wink.gif
You can get Dev-C++ (with MinGW) here:
You can grab MinGW alone here:
02-18-2004, 09:31 PM
A lot of [my] future questions concerning this topic were already answered by your replies, thanks!.
NightHacker, you cleared a lot about MinGW, DevC++, VC++, and DJGPP. tnanks again!
Nychold, C++ Builder X sounds interesting. I'll go check it out too.
[This message has been edited by coder1 (edited 02-18-2004).]
02-19-2004, 12:22 AM
Just a note about GCC (I use MinGW all the time): It optimizes very well. It competes with, or outperforms, optimizing Visual C++. It's a very nice compiler, with a massive installed user & developer base (all Linux distributions come with GCC). Dont assume that just because it is free, it doesn't optimize well.
Here is a simple compiler test: Compile my old raytracer, RayLab, with maximum omptimization, for the 686 architecture, and see how fast the executable is.
Compiler: Exe size / Run time
MinGW: 109 KB / 1m 50s
Visual C++: 164 KB / 1m 57s
OpenWatcom: 141 KB / 2m 53s
Borland C++: 150 KB / 4m 20s
PellesC: 134 KB / 6m 38s
(Visual C++ version is 6.0, optimizing)
Clearly, MinGW produces good code.
Note: According to this (http://www.intel.com/software/products/compilers/techtopics/compiler_gnu_perf.pdf) document by Intel, the Intel compiler (which is supposed to be the best compiler available) produces 10-30% faster binaries than GCC, which is not THAT impressive, considering...
[This message has been edited by marcus256 (edited 02-19-2004).]
02-19-2004, 09:57 PM
Considering the previous post:
If you want a complete developer package, with IDE, integrated debugger, and the lots, I would check out OpenWatcom (www.openwatcom.com). If you want the best compiler, with the highest portability, fastest and smallest executables, I would go for MinGW (which is what I currently do).
Btw, all compilers support OpenGL (but GLUT support may vary - use GLFW (http://glfw.sf.net) instead).
02-21-2004, 07:40 AM
Thanks for that reply, im having few questions about watcom too, but now i need not ask anymore. I'll use MinGW.
02-21-2004, 08:52 PM
Ignore this post...I made a stupid mistake. ^^
[This message has been edited by Nychold (edited 02-21-2004).]
I tried Dev-C++ to see how it performs. But the executable of the simplest console hello world program (using namespace std) takes op 436kB of space http://www.opengl.org/discussion_boards/ubb/eek.gif
Does the mingw compiler link the whole std library when only using some functions of it?
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.