Jump to content
  • Advertisement
Sign in to follow this  
Andy474

unresolved external symbol _Direct3DCreate9@4

This topic is 2403 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

Advertisement
Your include directory is wrong, although I don't understand how your code compiles at all if that's the case. It should be:
C:\Program Files\Microsoft DirectX SDK (March 2009)\Include

As for the library files, if you open up that directory in explorer (C:\Program Files\Microsoft DirectX SDK (March 2009)\Lib\x86), is there actually a d3d9.lib in there? And are you building a Win32 target rather than x64?

Share this post


Link to post
Share on other sites
Ok, I fixed the "\Include" bit ... no idea how I missed that.
I also checked for the d3d9.lib and it's in the x86 folder.
Also, I'm definitely not building an x64 project.

But I'm still getting the error. It only seems to work if I use the #pragma comment(lib,"d3d9.lib"); line.


VS makes linking so much more complicated than any other IDE I've worked with - I'm always running into linking errors. :-(

I've built programs in VS2008 with other libraries before, especially openGL and SMFL, and it took me a while to get the kinks out with linking those but I didn't run into this kind of trouble.

Share this post


Link to post
Share on other sites
Oh - I just noticed you're trying to use "d3d9.lib;", not "d3d9.lib" - note the extra semicolon. What does your additional dependencies line look like?

Share this post


Link to post
Share on other sites
*groan*
That was it.
(Could have sworn I tried that already.)

Sorry I wasted so much of your time. >.<
Thanks for the help though.

Share this post


Link to post
Share on other sites
Hi all i'm newbie about c++ can explain about this ?? sad.png

1>------ Rebuild All started: Project: D3D, Configuration: Release Win32 ------
1>deadhellbase.obj : error LNK2001: unresolved external symbol _Direct3DCreate9@4
1>deadhellmenu.obj : error LNK2001: unresolved external symbol "public: char * __thiscall cMenu::TIME(void)" (?TIME@cMenu@@QAEPADXZ)
1>D:\ABANG\Hasil Pembuatan D3D\D3D\Release\D3D.dll : fatal error LNK1120: 2 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Share this post


Link to post
Share on other sites

This topic is 2403 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.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!