Advertisement

Looking for a free compiler

Started by May 08, 2001 09:47 AM
16 comments, last by onlinegmz 23 years, 9 months ago
The C99 standard makes provisions for a bool data type. So, bool has now become a C feature, not longer a C++ feature

You might want to try out lcc-win32.

It''s a free C compiler (no C++) but it sure as heck is GOOD.
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
The only problem I had with DevC++ was once the code is executed, the program immediately quits. Take this Hello World program, for instance:


#include

int main()
{
cout << "Hello /n";
return(0);
}


If you compile and link this into a console app and then run it, it would simply show a DOS32 window for a second and die. I think you have to add some function at the end of your code to pause its execution, but I forget what it is.


Overall, MSVC is the best for Windows, and GCC is the best for Linux.
Advertisement
system("pause");
an other solution:

#include

...

_getch();

Whith this the program quit when a key is pressed...

add

getch();

to the end of the program (before return 0 to wait for a keypress

--------------------------

Whats a pretty girl like you doing in a dirty mind like mine?
Those who dance are considered insane by those who cannot hear the music.
Get Dev-C++ from bloodshed.net if you want a good free C/C++ windows compiler. I think you can use it with DirectX but you have to include the libirares and stuff, that is what the program''s creator told me. I find it to be a good program, although it could have a few more features. I don''t think there are that many bugs.

It compiles any standard windows or c/c++ program.

For the price it is a great program. (well it is a pretty good program even if you don''t concider the price)

Other good free programs for developers are:
For 3-d modeling - Blender, free from www.blender.nl
For HTML Editing - First Page, free from www.evrsoft.com
For Graphics editors - The Gimp, free from GIMP.org
For people who need a zip program better then winzip and for free - Power Archiver, free from powerarchiver.com
For all those windows haters and people who just need an OS - Debian Linux, free from Debian.org
For people who need ftp - Leech FTP, free search at google.com or hotfiles.com or something

See the internet is a great thing that gave us all this free stuff. (and that is just a fraction of it)

Matthew
WebMaster
www.Matt-Land.com
It is foolish for a wise man to be silent, but wise for a fool.
Advertisement
quote:
Original post by Some Guy
a DOS32 window



Actually, it''s a Win32 Window .



~~~~~~~~~~
Martee
http://www.csc.uvic.ca/~mdill
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
quote:

MSVC is best for Windows and GCC is best for Linux



MSVC may be the most convenient to use for Windows because it has everything pre-installed and ready-to-use (DirectX, MFC, you-name-it). GCC is as good for Windows as it is for Linux or any other platform/processor it supports (and it supports a HECK a lot of processors! You can compile code for PlayStation or a WinCE-box just with GCC).

I don''t recommend using Borland 5.5. Borland looks promising at a first glance because the process of compilation is fast and the executables produced are small. But the code it produces is inferior in optimization than GCC. I have run some tests and looked at the assembler output (especially with templates). Borland is a lame compiler to say the least, I wouldn''t use it, but that''s my opinion of course.

If you want to compile DirectX with GCC under windows, you probably first want to have GCC itself. The best port for Windows is MinGW32 (minimalist GNU for Win32)

http:///www.mingw.org
(the actual files are on sourceforge)

You must download at least five packages: The compiler, the "binutils", the c-runtime libs, the c++-runtime libs, the win32-api include headers. Extract all of them into a single directory, say "C:\mingw". Then fire up the program "sysedit" (just type "sysedit" in start->run command) and add the following lines to autoexec.bat:

set path=c:\mingw\bin;%path%
set MINGDIR=c:\mingw

Restart your computer and open up a console. Type "gcc -v" and the output sould read something in the lines of:

GNU Compiler Version 2.95.2 (19991024)

Probably you want a nice graphical environment too. There are many of them, as already posted in this thread. Note that Dev-C++ comes bundled with it''s own version of GCC so you don''t need the procedure above if you choose Dev-C++ (from www.bloodshed.net)

Next you need the DirectX include files and libraries. You can use the include files from the DirectX-SDK and copy them to "c:\mingw\include", they just work fine. If you don''t want to download the whole SDK just for the header files, I suggest you download this:

http://sunsite.auc.dk/allegro/wipdll/dx70_min.zip

Next you need the DirectX import libraries. The import libraries are needed to tell the compiler in which DLL to look for the functions that are defined in the include files. There is a cool guy who has precompiled DirectX-libs (DX 7 and DX 8) on his webpage:

http://sites.netscape.net/ptrpck/directx.htm

You must copy any file with the name "lib****.a" into the directory "c:\mingw\lib". Now you are ready to compile a DirectX-program with GCC under windows.

Of course you will need some documentation on GCC itself and how to use it in general. Just fire up a search engine and scoop the internet, there lots of FAQ''s and HOWTO''s.

In case any of the links given above is dead, I have all the files. Email me: cschueler@gmx.de

cheers
-chris


This topic is closed to new replies.

Advertisement