Skip to main content
gamedev.net
🔒 Locked

Problems using DirectX SDK+.Net2003

Started by Thors1982 9 replies 1.3k views
Original Post
Thors1982
Thors1982
Hey, I coded a little DirectX 8 in the old Visual Studio 6 I am currently reading "Programmign Role Playing Games with DirectX" and I was trying to run a few of the programs from the book. I installed DirectX 9.0 SDK and runtime. I have Visual Studio .Net 2003. I opened the a couple of the projects and when i build them I get this error LINK : fatal error LNK1104: cannot open file 'libci.lib' I added the directX directories "lib" and "include" to .Net by going to tools options "Projects" then "VC++ Directories" Anything else you can think of why none of the projects out of the book will work, they came from a CD so I doubt its typed wrong. Also, I remember getting them to work back when I was using Visual Studio 6. That is why I believe its something wrong with how i set it up. Thanks in advance
SiCrane
SiCrane
I believe that's actually a problem with importing the projects from older versions of Visual C++ into 7.1, you can try adding /NODEFAULTLIB:libci.lib as a linker setting, or recreating the project from scratch.
Thors1982
Thors1982
AHHH, that makes a lot of since actually

I tried creating the project from scratch though, what is the best way to create a DirectX project. I have a feeling I just started with the wrong project type. I tried just doing Empty Project and adding the .cpp file and the resource .bmp and I got these errors.


WinMain.obj : error LNK2001: unresolved external symbol "long __stdcall D3DXCreateTextureFromFileA(struct IDirect3DDevice8 *,char const *,struct IDirect3DTexture8 * *)" (?D3DXCreateTextureFromFileA@@$$J212YGJPAUIDirect3DDevice8@@PBDPAPAUIDirect3DTexture8@@@Z)

WinMain.obj : error LNK2001: unresolved external symbol "struct IDirect3D8 * __stdcall Direct3DCreate8(unsigned int)" (?Direct3DCreate8@@$$J14YGPAUIDirect3D8@@I@Z)

C:\Documents and Settings\Thors\My Documents\Visual Studio Projects\temp\Debug\temp.exe : fatal error LNK1120: 2 unresolved externals

Thanks again
RenderTarget
RenderTarget
You have to link against d3d9.lib and d3dx8.lib (or the 9 versions for DX9, of course).
[sub]My spoon is too big.[/sub]
Thors1982
Thors1982
what?

I thought it was no big deal to download directX 9 SDK and use directX 8, I thought everything was backwards compatible.

What can I do to fix these problems?
S1CA
S1CA
Quote:
Original post by Thors1982
what?

I thought it was no big deal to download directX 9 SDK and use directX 8, I thought everything was backwards compatible.

What can I do to fix these problems?



I suspect RenderTarget made a typo and meant "link against d3d8.lib and d3dx8.lib (or the 9 versions for DX9, of course).
"


1) In VS.NET, go to the Project menu and the Properties for your project.

2) Open up the Configuration Properties and go to Linker

3) Add the library files mentioned above to the "Addional Dependencies" list


BTW: for the Debug configuration you may want to use d3dx8d.lib rather than d3dx8.lib to get extra debugging information from D3DX.
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
Thors1982
Thors1982
Hmmmm,

I am still having problems i couldn't find it under linker I found "additional dependicies" under "Custom Build Step" I added "d3dx8d.lib d3d8.lib d3dx8.lib" but it still doesn't compile, It gives the smae error.

WinMain.obj : error LNK2001: unresolved external symbol "long __stdcall D3DXCreateTextureFromFileA(struct IDirect3DDevice8 *,char const *,struct IDirect3DTexture8 * *)" (?D3DXCreateTextureFromFileA@@$$J212YGJPAUIDirect3DDevice8@@PBDPAPAUIDirect3DTexture8@@@Z)
WinMain.obj : error LNK2001: unresolved external symbol "struct IDirect3D8 * __stdcall Direct3DCreate8(unsigned int)" (?Direct3DCreate8@@$$J14YGPAUIDirect3D8@@I@Z)
C:\Documents and Settings\Thors\My Documents\Visual Studio Projects\temp\Debug\temp.exe : fatal error LNK1120: 2 unresolved externals



Am I not listing these the right way or the right files... any other ideas?
S1CA
S1CA
Aargh! I forgot to sign in + the board killed my "strike" tags. The second and third points should read:


2) Open up the Configuration Properties and then expand the "Linker" options

3) Select the "Input" group within the Linker settings.

4) Add the library files mentioned above to the "Addional Dependencies" list at the top of the Linker->Input settings.



Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
Thors1982
Thors1982
Thank you thank you thank you :-)

now hopefully i can learn what I am doing with this whole directX stuff
RenderTarget
RenderTarget
Quote:
Original post by S1CA
I suspect RenderTarget made a typo and meant "link against d3d8.lib and d3dx8.lib (or the 9 versions for DX9, of course).
"



Indeed I did. My apologies. [embarrass]
[sub]My spoon is too big.[/sub]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.