-
March 30th, 2004, 11:27 AM
#1
Unresolved External Symbol! Help!
Hey there,
I am trying to create a Direct3D program, however when I try to compile and run the program I get the following error:
PainterlyRenderer error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "int __cdecl InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@YAHPAUHINSTANCE__@@H@Z)
It seems that my program does not like the call to
Direct3D_Object = Direct3DCreate9(D3D_SDK_VERSION);
that I have defined in my program. I have declared all my variables (Direct3D_Object is of type LPDIRECT3D9) and I have included both:
#include<C:\DX90SDK\Include\d3dx9.h>
#include<C:\DX90SDK\Include\d3d9.h>
in my program. So I'm not sure why my program can't find the Direct3DCreate9 function. (I have also linked my program to the libraries where this function is found).
If anyone has any suggestions about what I am doing wrong, it would be greatly appreciated!
Thanks
Danielle
-
March 30th, 2004, 12:26 PM
#2
Re: Unresolved External Symbol! Help!
Originally posted by danielleM
So I'm not sure why my program can't find the Direct3DCreate9 function. (I have also linked my program to the libraries where this function is found).
Are you really sure about that? The Direct3DCreate9 function requires the d3d9.lib library according to MSDN. Could you please double-check that it really is being linked?
-
March 30th, 2004, 05:00 PM
#3
Hey,
Yea, I'm am sure, which is why I am confused myself.
I went into Project\"Project Name Properties"\Linker\General\Additional Library Directories
and added in where to find the direct3d libraries on my system.
Any other suggestions? Or is there something more I need to do to link them into my program?
Danielle
-
March 30th, 2004, 05:04 PM
#4
Hey there,
I found my problem...
I had linked them in, but had never really "added" them to my program. It now works, since I physically added them into the files in my source view
Danielle
-
February 19th, 2005, 05:20 PM
#5
Re: Unresolved External Symbol! Help!
Hi danielleM,
I'm having the same problem you had long time ago.
Can you tell me exactly what did you do to resolve it. ("added them into the files in my source view" ??? what is that??)
Thanks,
MasterLuLu
-
August 18th, 2006, 05:58 AM
#6
Re: Unresolved External Symbol! Help!
Hey, Just Encountered the same thing.... and solved it kind'a using what was writen here ....
i had a problem i linked the x64 Lib files instead of the x86 .
you may link the files using the proporties page
Proj Proporties->Linker->Input->additional Dependencies=d3dx9.lib d3d9.lib
for Win 9x, XP, 2000
be sure your library directory is set to DXSDK/lib/x86
for Win 64
be sure your library directory is set to DXSDK/lib/x64
wish it will help.
-
April 30th, 2009, 10:28 AM
#7
Re: Unresolved External Symbol! Help!
I encountered the same issue as well...
In Visual Studio C++, I had to go to Tools->Options->Projects->VC++ Directories and choose "Show directories for:" in the upper right hand corner and select "Include files" -- and then enter the folder where the header files I'd be using are found.
I also had to go to Project->Properties->Linker->Input->Additional Dependencies and enter the full path of the library file I'd be using
I hope this helps someone out there =)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|