Recommended Posts

I installed VC++ express 08 and the directx sdk. I followed the instructions presented at a number of sites, and finally got all of the included directx tutorials (such as the trippin' triangle) to compile. But when I start a blank project in VC++ and simply copy + paste working code, and then compile, I get teh following errors:
error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "long __cdecl InitD3D(struct HWND__ *)" (?InitD3D@@YAJPAUHWND__@@@Z)
(my directory): fatal error LNK1120: 1 unresolved externals
Is there something else I need to link, that the tutorials automatically included? I googled and such, and have not been able to resolve the error.
I dont have a broadband connection, so simply getting visual express and the directx sdk was a hassle and now it is very frustrating that it is not working. I saw that some websites also said to download the platform sdk, but the examples compiled fine without it, it is just when I try to do my own code that everythign fails. Obviously, getting the platform sdk would be a large hassle for me right now (Id probably have to order it and wait like 4 weeks for it to arrive); I want to start programming in directx now.
Does anyone know if setting up opengl is relatively easier do to? I am not a novice programmer by any definition, and i want to move towards 3d graphics and such, but it is so frustrating because of my lack of resources (ie the internets).
I would appreciate any and all help.

Share this post

Link to post

Share on other sites

It's the same as DevC++, you must add d3d9.lib (as well as d3dx9.lib, if you're using it) to the list of additional dependencies in your linker settings. You can find this in Project Properties->Linker->Input.

0

Share this post

Link to post

Share on other sites

Original post by MJPIt's the same as DevC++, you must add d3d9.lib (as well as d3dx9.lib, if you're using it) to the list of additional dependencies in your linker settings. You can find this in Project Properties->Linker->Input.