Archived

This topic is now archived and is closed to further replies.

Wogan

NOT Using VC++

Recommended Posts

Hey all, I''ve done some (little) C/++ Programming in the past, but it has all been with MS Visual C++, which I no longer want to use because: 1) It''s way too complex for my needs, and 2) I really can''t afford it. (add in 3- MS Suxors if you are that way inclined too). So anyway, I''ve been looking around for FREE alternatives, and have basically decided on using the Borland Command Line tools available for free on their website. I am having some problems setting it up though, and I thought some knowledgable person here could give me a clue in the right direction. I have the MS Platform SDK Installed, and the DirectX 8 SDK as well. I am trying to compile the first DX Tutorial, (the Devices one). I have set up the Include path to first include the Borland Includes directory and then the Platform one. I have done the same for the Lib path. After a bit of mucking around I have got it to compile okay, but the linking stage fails, saying it cannot resolve the reference to CreateDevice8. In the SDK docs, it says this function is in dxd8.lib, which is in the MS Platform Lib path. I''m stumped as to why this is not working. All help is appreciated. ----- Keep him tied, It makes him well He''''s getting better, Can''''t you tell?

Share this post


Link to post
Share on other sites
The .lib format is different for Borland.

Check out this web page for everything you need :

http://www.geocities.com/foetsch/borlibs/

Share this post


Link to post
Share on other sites
Dude, that sucks! Oh well, at least there is a workaround. Or I could check out Mingw, perhaps that will work with the MS Libs.

Thanks to both of you for your help


-----
Keep him tied, It makes him well
He''''s getting better, Can''''t you tell?

Share this post


Link to post
Share on other sites
You''ll have to recreate .lib files from the directx dlls. I''ve had the same problem (but with the dirext 7 sdk): microsoft has created .lib files for the borland compiler, but they simply don''t work. Recreating solves this problem almost entirely (you can do this with borland''s implib tool). However, implib only puts the dx function addresses into the lib file, and some constants are missing (like c_dfDIKeyBoard), so for example setting up keyboard input using directinput can be some/a lot more work. Btw, if anyone knows a tool that does include these constants in a lib file, I''d really like to know where I could that tool!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
or you could just use DX7...yes I know it''s older blahrdy blahrdy blah...but it has Borland Libs with it that work fine. I use them myself, might do for learning purposes.

Word of warning though, I''m also using the Borland commnd line compiler, and compiling the same code in that resulted in a larger and slower exectuable (very noticeable) than when compiled under M$ VC++....in fact it''s tempted me to buy VC++!!!...and I can''t stand Microshaft!

Share this post


Link to post
Share on other sites
Well I''ve actually had this problem with directx 7.0! Have you just linked with the libraries that come with the sdk? If not, I''d really like to know how you''ve done that.

The borland version could be slower because the library files created with implib only contain the addresses of directx functions (and the actual code is still in the dll). This results in smaller lib files, smaller executables, but the code is also slower (because of the dll-call overhead).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Anonymous Poster
or you could just use DX7...yes I know it''s older blahrdy blahrdy blah...but it has Borland Libs with it that work fine. I use them myself, might do for learning purposes.

Word of warning though, I''m also using the Borland commnd line compiler, and compiling the same code in that resulted in a larger and slower exectuable (very noticeable) than when compiled under M$ VC++....in fact it''s tempted me to buy VC++!!!...and I can''t stand Microshaft!


If it''s important to you... intel has a compiler. It produces even faster code than MSVC. In fact, it produces (not very surprising) the fastest code of any C++ compilers for the x86 architecture.

Share this post


Link to post
Share on other sites
quote:
Original post by nickm
The borland version could be slower because the library files created with implib only contain the addresses of directx functions (and the actual code is still in the dll). This results in smaller lib files, smaller executables, but the code is also slower (because of the dll-call overhead).


The same is true for the VC++ libs - they are import libs, not static libs(except for D3DX).


Once there was a time when all people believed in God and the church ruled. This time is called the Dark Ages.

Share this post


Link to post
Share on other sites
I''ve been using the Borland command line compiler which is pretty straight forward and simple. it takes a little while getting the environment working (downloading the appropriate .lib files and whatnot). but assuming you can write up makefiles and deal with a command line experience, it''s pretty sleek and more importantly FREE.

http://www.borland.com/bcppbuilder/freecompiler/cppc55steps.html

-me

Share this post


Link to post
Share on other sites
You can pass MS lib files to Mingw as if they were object (.o) files, it will work, however I had some problems with some COM wraper calls calls (i.e. DirectDrawCreate).
if someone has a workaround, I would like to hear about it, since I can''t get the LoadLibrary aproach right.

I just use Peter Puck''s libs for now.

Share this post


Link to post
Share on other sites