Jump to content
  • Advertisement
Sign in to follow this  
gfreak5

Unresolved external symbol

This topic is 4888 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just got Microsoft Visual C++ 6.0, but as soon as i tried to build a directX 9 program i got the error "unresolved external symbol _Direct3DCreate9@4" I linked both d3d9.h and d3dx9.h, and have added the folder to the directories in the program. If someone could help me with this or point me to a thread that actually explains this, id be very obliged. Thank you.

Share this post


Link to post
Share on other sites
Advertisement
"I linked both d3d9.h and d3dx9.h"

You cant link h files you include them. You need to link d3d9.lib and d3dx9.lib IIRC.

Share this post


Link to post
Share on other sites
In order for it to work include the files you mentioned and also add the
d3d9.lib and d3dx9.lib files in the Project->Settings under the Link tab Object/Library modules.

Share this post


Link to post
Share on other sites
You might also link knowing that you can link in the source file itself, vs. hidden off in the project files by using:
#pragma comment( lib, "d3dx9.lib" )

just stash that up near your includes for good measure. No semi-colin, as with all compiler directives.

Share this post


Link to post
Share on other sites
Thanks guys, that really helped. I meant that included them in my first post, sorry about that. I went and linked everything, but then it said that i have an "invalid machine type" and cant open the library. What is that? Sorry about asking so many questions, but im just getting into DirectX, thank you again for all help.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!