Game Development Community

Fatal error LNK1104: cannot open file "d3d9.lib

by Hokuto · in Torque Game Engine Advanced · 06/26/2005 (9:13 am) · 10 replies

Hi,
I'm getting this error when trying to build tse
fatal error LNK1104: cannot open file "d3d9.lib".

I'm using VC++.NET 2003 (7.1)

1) I downloaded the latest tse HEAD with WinCVS
2) I simply followed the instructions on the GG page about getting stared with .net 2003
3) I added both the lib and the include path 'to the top' of the Tools->Options->Projects->Directories (lib ad Include)

C:\Program Files\Microsoft DirectX 9.0 SDK (February 2005)\Lib
C:\Program Files\Microsoft DirectX 9.0 SDK (February 2005)\Include

But when I go to
Build-> Torque Shader Engine
I get this error:
fatal error LNK1104: cannot open file "d3d9.lib"

Are those spaces within the path names safe?

Anyone had the same issue and resolved it?

thanks

I had a look at some othe thread mentioning this issue, but I don't see solutions in there related to
VC++ .Net 2003 (7.1)

Thanks

#1
06/26/2005 (9:45 am)
When you download the extras package for February 2005, copy the files from one of the folders (not sure which but you'll know) to the Lib folder, and overwrite the existing ones. (Including d3d9 and some others)
#2
06/26/2005 (9:53 am)
Actually I didn't see the extras for Feb2005 before...
I'm downloading it now... thanks...
I'll see if this helps


BTW
I just saw there is an April and a
DirectX 9.0 SDK Update - (June 2005)

I wonder if udpating to June 2005 is a good idea, as I don't know if the current tse head has been used/tested with this latest DX update
#3
06/26/2005 (10:12 am)
IT WORKS NOW!!!

SOLUTION

Ok,
if anyone was as blind as I'am...
and if anyone was as hopelesssssss as I have been, this is what I did wrong

The path for the LIB was incomplete:
I had this one
C:\Program Files\Microsoft DirectX 9.0 SDK (February 2005)\Lib

But I failed to see that in that folder there were 2 subfolders, the x64 and the x86 one!
By adding the right folder it works just as it should!
right path
C:\Program Files\Microsoft DirectX 9.0 SDK (February 2005)\Lib\x86


I did not add the Extras from Feb2005... and I did not install the June 2005 yet...
for now it works...
before updating DX to Jun2005 I would like to hear from GG people if that is a safe thing to do for TSE and TGE and T2d

cool...
now I can get going until my next hopeless mistake!
#4
06/26/2005 (10:49 am)
Oh, my mistake was caused using the October version, which has no need to mess with the directories of choosing x86. You'll want to take a look at what's in the extras, and add the DirectX .lib files into that x86 folder, I'd think.
#5
06/26/2005 (1:36 pm)
Ah, a new DXSDK, how grand. Yes, in general TSE will work with the newest DXSDK. TGE/T2D don't care, they use their own libs.
#6
06/27/2005 (7:33 am)
Thanks Ben!
#7
10/08/2007 (12:56 pm)
Hi guys! I seem to be having the same problem, but I'm not sure how to fix it even after reading your posts.

I am using TGEA 1.0.3

and I'm building with Visual C++ 2005 Express.

I'm getting this error when I try to build:

LINK : fatal error LNK1104: cannot open file 'd3d9.lib'
Build log was saved at "file://c:\Torque\TGEA_1_0_3\engine\out.vc8.win32.debug\BuildLog.htm"
Torque Game Engine Advanced - 1 error(s), 0 warning(s)

Anythoughts? And in english... I'm still new to the programming side. :p

-Josh
#8
10/08/2007 (11:50 pm)
You forgot to add the DX SDK lib and include folder to your visual studio options, c++ directories
#10
11/21/2007 (11:19 am)
If you have an old copy (Summer 2003) of the DirectX SDK, it will not compile with the rest of the includes that ship with TGEA, or with VC 2005. I updated to the April 2007 version and fixed the compile problems.