# trouble linking d3d9.lib in compiler

## Recommended Posts

Darkware    122
Trying to mess around with DirectX again, but I don't seem to be linking d3d9.lib in correctly. I'm using the DirectX 9.0c SDK and have installed it to C:\Program Files\Microsoft DirectX 9.0 SDK (Summer 2004)\Lib\d3d9.lib In Project>Properties>Linker>Input>Additional Dependencies I typed d3d9.lib however whenever I try to build my solution, I get "fatal error C1083: Cannot open include file: 'd3dx9tex.h': No such file or directory". This is in a project that used to compile just fine when I left it a year ago, so I'm guessing it has to do with the compiler not knowing where the include files are. Any suggestions?

##### Share on other sites
seedy    122
This is a compilation error and not a link error.

If you have the file on you PC ( the d3dx*.h may not be part of the standard directx sdk ) then you need to add the path to the files ( and also for the linker to get the .lib files )

I you dont have the files on your pc then you will have to get them.

Cheers

Andrew

##### Share on other sites
Evil Steve    2017

##### Share on other sites
Darkware    122
Evil Steve, that fixed my problem. Thank you very much.

I have a new problem now however. :
1>LINK : fatal error LNK1104: cannot open file 'libcp.lib'

I'm not sure I know what I'm talking about, but is a Win32 application old stuff and do I need to make an x64 project instead? I don't think I even know how if that were the case though because I don't see an option for that. I'm thinking that maybe the lib and include files for VS2008 are all x64 and Win32 isn't supported any more? I have no clue, I'm just guessing.

EDIT: Ah nevermind, I found the solution here http://www.gamedev.net/community/forums/topic.asp?topic_id=284023&whichpage=1�

Thanks for everyone's help. Problem solved for good now.