• Advertisement
Sign in to follow this  

Linker errors with new computer

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

Hey guys, I recently bought a new computer and was setting up my new development environment when I ran into issues. My old computer used visual studio 2008 express edition, and now I'm using VS 2010 express edition. There were some minor kings with how to setup include directories and such (because 2010 is different than 2008 in this regard) but I got those setup I think. I was getting "could not find *.h" or "could not load lib" errors but now its compiling but getting linker errors. The errors I'm getting are along the lines of "LNK2019: unresolved external symbol _D3DXCreateSprite@8 referenced in function "public: bool __thiscall Font::init(struct IDirect3DDevice9 *,char *,int,int,int)" (?init@Font@@QAE_NPAUIDirect3DDevice9@@PADHHH@Z)".

A few notes: this works on my windows xp 32 bit visual studio 2008, but is not working on visual studio 2010 on windows 7 64 bit. I downloaded the directx sdk from microsoft (its august 2009) along with the luabind/lua installs. I'm linking to 64 bit versions of the libs in all cases. I'm including my libs via: #pragma comment (lib, "d3d9.lib")

Any ideas why this might be happening?

Share this post


Link to post
Share on other sites
Advertisement
I appreciate the response but its not just directx, and if the d3dx library was missing, I get a compile error. Any other ideas?

Edit: Sorry if there was confusion, I only gave an example which was direct x

Share this post


Link to post
Share on other sites
I got this to work, but I want to share what I learned so others who google this might have an answer:

So first thing I discovered was that most of the august 2009 dx lib (and other libs I was using) were probably compiled under VS2008, not VS2010 which was causing problems (I got this from a good result, the validity of this is not known). So I got vs2008 and tried that, didn't work. I then tried (with vs2008) to link against x86 version of the libs whereas I was previously linking to x64 version of the libraries. This goes for lua/luabind/directx (the libs giving me trouble). I am not 100% sure everything is working, but my game compiled and ran seemingly fine and so I feel like I got past this. Thanks.

Share this post


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

  • Advertisement