Problems setting up Direct3D

Started by
2 comments, last by PeterV 15 years, 7 months ago
Hi, I´m trying to set up d3d9 in my application but I get this linker error: [Linker Error] Error: Unresolved external 'Direct3DCreate9' referenced from C:\DEVELOPER\TEST APPLICATION\TAMAINFORM.OBJ I´ve included d3d9 by adding #include <d3d9.h> and there are a lot of d3d function call in my code where my compiler does not have a problem with. It only the Direct3DCreate9 function which gives problems. Have I forgotten to include something? Peter
Advertisement
You need to link to d3d9.lib in your linker settings.
Yep, this is definatly a linker problem.
A cheats way to link is to have the following in the top of your code (assuming you are using Visual Studio)

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

But even then, you need to have your linker paths setup correctly.
Thanks for the help guys, I´ve got it running now.

It actually took some time before I got it right because I´m using Borland C++ and I didn´t knew the standard libs do not work for Borland so I had to search for the right libs on the web.

Thanks again,

Peter

This topic is closed to new replies.

Advertisement