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