Direct X wierdness

Started by
17 comments, last by SoulSkorpion 20 years, 10 months ago
Michael: He has the file in the project VC++ just can''t find it.

You need to make sure that the path to the DX libs is at the TOP of your list of library paths. I don''t know exactly how to do that b/c I don''t use VC++, but I''m sure you can figure it out.
Advertisement
Explicitly including the .lib and .h files hasn''t helped. Physically copying the library to the same directory as the project, adding, and compiling hasn''t worked. Changing the order of the Direct X directories in the options hasn''t worked (not even including both of the installed copies of the SDK - one at the top of the list and one at the bottom).

By the way, after adding #include <basetsd.h> a whole pile of "external dependancies" popped up in the project window, for some unknown reason (I don''t get "external dependancies" when I #include <stdio.h>, so something must be screwy). Of course, manually adding every single one of the "external dependancies" to the project hasn''t helped.
-------------"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."- Charles Babbage (1791-1871)
You can always try this then:

#pragma comment(lib,"d3d8.lib")

____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won''t engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.

No no no no! :)
#pragma comment(lib,"d3d8.lib") didn''t help either.

Time to get a new compiler?
-------------"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."- Charles Babbage (1791-1871)
ok. Let''s try this again...

I started an entirely new project, as a "win32 Application", included the same .cpp file. The preprocessor directives at the top of the file read:

#pragma comment(lib,"d3d8.lib") //added by me
#include <windows.h>
#include <basetsd.h> //added by me
#include <d3dx8tex.h>
#include <dxerr8.h>
#include <d3d8.h>

When I try to compile, it''s decided it *can* open d3d8.lib. It''s come up with something new to whinge about now:

TriangleApp.obj : error LNK2001: unresolved external symbol _DXTraceA@20

1: What in the hell does that mean?
2: Is there anything I can do about it?
-------------"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."- Charles Babbage (1791-1871)
Surely the file "d3d8.lib" is missing from your settings.

To include this:
1. Choose from the menu "Project->Settings". A "Project Settings" dialog box will open.
2. Choose the 4th tab ("Link" tab).
3. In "Object/library modules" edit box add the file name "d3d8.lib", without the quotes.
That''s it.

Regarding setting the DirectX directory to a higher priority:
1. Choose from the menu "Tools->Options". A "Options" dialog box will open.
2. Click on the "Directories" tab (6th tab).
3. For "Show directories for" combo box, make sure "Include files" is selected.
4. From the "Directories" list control, highlight your DirectX folder.
5. Click on the UP arrow (situated alongside the list control''s header, an UP arrow icon is there). Click the UP arrow until the highlighted path becomes the topmost part.

Hope this helps...
BTW, that linkage error hints that probably an appropriate library file (.lib file) is missing from your setting.
"not even including both of the installed copies of the SDK"
I doubt that you should have two copies installed, since the installer will tell you to uninstall previous versions.
quote:Original post by SoulSkorpion
ok. Let''s try this again...

I started an entirely new project, as a "win32 Application", included the same .cpp file. The preprocessor directives at the top of the file read:

#pragma comment(lib,"d3d8.lib") //added by me
#include <windows.h>
#include <basetsd.h> //added by me
#include <d3dx8tex.h>
#include <dxerr8.h>
#include <d3d8.h>

When I try to compile, it''s decided it *can* open d3d8.lib. It''s come up with something new to whinge about now:

TriangleApp.obj : error LNK2001: unresolved external symbol _DXTraceA@20

1: What in the hell does that mean?
2: Is there anything I can do about it?


You need to add dxerr8.lib



____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won''t engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.

No no no no! :)
It works! IT WOOOOOOORKS!

#pragma comment(lib,"dxerr8.lib") made it compile! Thank you thank you thank you, Michael!

w00t! Finally!
-------------"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."- Charles Babbage (1791-1871)

This topic is closed to new replies.

Advertisement