Archived

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

Strategy

DirectX 7a

Recommended Posts

Strategy    226
Having a lot of problems trying to get DirectX 7a working with BCB4. I''m getting a lot of undefined symbols (IDirectDraw7, Draw, etc) and undefined functions (DirectDrawCreateEx), etc. Any suggetsions as to how to fix this? I''ve tried to follow several old threads, and checked on the web, but haven''t found a solution to the problem.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
I''m not really sure what you''ve tried already but i''ll give you a try...

1- don''t forget to set the include and library directories in your compiler/IDE ''s preferences.
If there''s a list of inc./lib dirs, put in the directories containing your DirectX .lib and .h files in AT THE TOP.

2- don''t forget to link the runtime libraries (ddraw.lib, dxguid.lib and whichever ones you need)...
In BCB i don''t know how, in VC++ you need to manually type the names in a preference window. Find it for you compiler.

Then you must be OK.

Good luck!

Share this post


Link to post
Share on other sites
risingdragon3    382
You know, I did send you an email about this
Is the linking failing or is the compile failing?
If it is linking , remember to link in the libs:
[source]
#pragma link "dxguid.lib"
#pragma link "ddraw.lib"
[\source]
You know, if you do this, that you must set the correct library path in Project Options. I think.
or do this:
[source]
#pragma link "c:\\mssdk\\lib\\borland\\dxguid.lib"
[\source]
although that would hard-code the directory. So that is why I did not do that, but opted to set the path in the project.




------------------------------
BCB DX Library - RAD C++ Game development for BCB

Share this post


Link to post
Share on other sites
risingdragon3    382
Duh! The _compile_ is failing.
The _compile_!

Simply, make sure that the include directories include the DX7 MSSDK first, before the usual BCB ones. This is because, BCB4 has DX6 in the directories, and BCB5 has DX7, so that''s why it doesn''t work!

It _will_ work!


------------------------------
BCB DX Library - RAD C++ Game development for BCB

Share this post


Link to post
Share on other sites
Strategy    226


Changing the order of the includes fixed it. Doh!

Got a new set of interesting and entertaining problems though.

The BCBDX libraries make use of the IncludeTrailingBackslash function. This function does not appear to exist in BCB4 - what exactly does it do (currently I've just made a dummy function that returns the same string).

The D3DObj lib requires the following DirectX libs:
d3dx
d3dxd
- These two do not exist in the borland directX 7 libs. How did you get hold of them?

d3dxim
d3dxrm
- Don't exist anywhere? I assume they have been renamed b/cos you have done something to the d3dim and d3drm libs.

Can you either enlighten me about how these libs are created, or send me the files, C++freak? Or is there some discussion/help file I've overlooked.

At the moment I just run it without D3DObj, which seems to work fine. Of course I haven't started putting it through the hoops yet - will let you know how that goes after the weekend.

Edited by - strategy on October 6, 2000 5:52:17 AM

Share this post


Link to post
Share on other sites
risingdragon3    382
quote:

The BCBDX libraries make use of the IncludeTrailingBackslash function. This function does not appear to exist in BCB4 - what exactly does it do (currently I''ve just made a dummy function that returns the same string).


Note made - will write the function very very soon. Actually, all it does is to make sure that:
"c:\windows" is turned into "c:\windows\"
for PakFiles and such like so that when you want:
"paintbox.bmp" in the "c:\dev\img" directory, you don''t get a error saying cannot find file "c:\dev\imgpaintbox.bmp", and instead get the file "c:\dev\img\paintbox.bmp".
quote:

The D3DObj lib requires the following DirectX libs:
d3dx
d3dxd
- These two do not exist in the borland directX 7 libs. How did you get hold of them?

d3dxim
d3dxrm


Umm....... It shouldn''t need these? It should need:
d3dim.lib - direct3d immediate mode
ddraw.lib - directdraw
dxguid.lib - GUIDs
dinput2.lib & dinputdata.dat - input files
Thats all. Where is the requires coming from?


------------------------------
BCB DX Library - RAD C++ Game development for BCB

Share this post


Link to post
Share on other sites
Strategy    226
Requires: There's a whole bunch of files linked in my version of the d3dxobj.cpp file. Deleted the lot of them and only linked the files you mentioned and everything seems to compile. Now all I need to do is to figure out how to get the libs to work.

Getting an error when trying to download the zipped tutorial code.

Edited by - strategy on October 7, 2000 1:10:07 PM

Share this post


Link to post
Share on other sites
risingdragon3    382
hmm: d3dxobj.cpp? Will look into
Anyways, apologies for the source code for the tutorial not working (downloading) Apparently I have not setup the anonymous FTP directory right.... oops. Will put it into the more normal place: the HTTP directory, of course
Anyways, that should be up in a moment.
Grrr! So many problems

------------------------------
BCB DX Library - RAD C++ Game development for BCB

Share this post


Link to post
Share on other sites