Free Directx Compiler

Started by
6 comments, last by nanobyte 22 years, 8 months ago
I only have the intro edition of Visual c++ and I was wondering if there is a free compiler out there besides bloodshed dev-c++ (not to much luck getting it to work) ?
Advertisement
The intro edition of Visual C++ compiles DirtectX programs--just include ddraw.h and add ddraw.lib as a library (If your using DirectDraw) If your trying to set up D3D...I can''t help you.
Borland c++ 5.5 the free command line version can do directx, although you will have to download special made libraries or create your import libs to get it to work.
Borland''s compiler can only be used for personal use, no distribution of compiled code unless you buy it.

I''ve had no problems with Dev C++ though, just dynamically link to the DX dll''s.
euh.. I''m using Dev-c++ and it''s perfect, you have just to get the dx8 SDK (1mb) from www.openrpgs.com (see the downloads/others section), follow the instructions in the zip, and start doing anything you want with directX 8.

a happy dev-c++ user
http://aminouch.tripod.com
mine from morocco
Unless Im mistaken there is no such restriction on the borland compiler. After reading there license agreement once again. The following is what I have found.

You may write and compile (including byte-code compile) your own application programs using the Software, including any libraries and source code included for such purpose with the Software. You may reproduce and distribute, in executable form only, programs which you create using the Software without additional license or fees, subject to all of the conditions in this License Agreement.

The agreement further goes on about not being able to distribute the actual compiler, or various libraries/documentation, as well as how they are not liable and blah blah blah.

But from what I read it would appere clear that you are free to do whatever you wish with what you compile.

The following link is there agreement
http://community.borland.com/cgi-bin/surveys/agree.cgi?sid=37

Please inform me if you find otherwise.



I use the free Borland compiler, and it''s great. (I use it with the EMACS for Windows). I just switched to it a few days ago, so I shared your dilemma. You''ll have to figure out, if you aren''t familiar with them already, makefiles and how to write them, so that compiling is just as easy as in an IDE.

You don''t have to download the special Borland- version import libraries, because they are included in the DirectX SDK. Except for the DirectInput one, which is corrupt somehow. These DOS commands will fix it:

REM ******************************
REM CUT HERE*********************
C:
cd \TEMP
copy \MSSDK\LIB\BORLAND\DINPUT.LIB \TEMP
tlib dinput *dilib1.OBJ *dilib2.OBJ *dilib3.OBJ *dilib4.OBJ *dilib5.OBJ
tlib dinput *DirectInputCreateA.OBJ *DirectInputCreateEx.OBJ
tlib dinput *DirectInputCreateW.OBJ *DllCanUnloadNow.OBJ
tlib dinput *DllGetClassObject.OBJ *DllRegisterServer.OBJ
tlib dinput *DllUnregisterServer.OBJ
erase dinput.lib
tlib dinput +dilib1.OBJ +dilib2.OBJ +dilib3.OBJ +dilib4.OBJ +dilib5.OBJ
tlib dinput +DirectInputCreateA.OBJ +DirectInputCreateEx.OBJ
tlib dinput +DirectInputCreateW.OBJ +DllCanUnloadNow.OBJ
tlib dinput +DllGetClassObject.OBJ +DllRegisterServer.OBJ
tlib dinput +DllUnregisterServer.OBJ

If you''re slick, you don''t even have to use the import libs. Just use the COM-compliant CoCreateInstance+Initialize instead of DirectDrawCreate and DirectPlayCreate etc., and use LoadLibrary+GetProcAddress instead of any enumeration functions. This is a good idea incase the user doesn''t have DirectX DLL''s on his system; when LoadLibrary fails, you can handle the error yourself.

Another warning about a problem that I can see a lot of game programmers running into with the Borland Compiler: there appears to be a limit on .res file size that is somewhere between 800kb and 1600kb.

These problems took me hours. Hoped this helped.
Yeah I suppose you could dynamiclly load the dll''s themselfs ,but as far as libs being in the sdk, I think your talking about DX 7 or older cause I didnt see any in DX 8.

Anyways the borland compiler is pretty cool, I personally miss my vc++ 4.0 enterprise edition, but seeing that DX 8 wont work with it, and I dont feel like paing 400$ for a 6.0 pro version, ill stick to borland

This topic is closed to new replies.

Advertisement