• Advertisement
Sign in to follow this  

problem in release

This topic is 4068 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 am working on a simple break-out game, and up until now I have been compiling it in debug mode. I haven't had any problems thus far, until the other day when I tried to compile in release mode. It gave me the following linking errors.
Linking...
WinMain.obj : error LNK2001: unresolved external symbol _D3DXCreateTextureFromFileA@12
ZTemplate.obj : error LNK2001: unresolved external symbol _D3DXCreateTextureFromFileA@12
WinMain.obj : error LNK2001: unresolved external symbol _Direct3DCreate9@4
Release/block_buster.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
Can anyone tell me why my program may compile fine in debug but have the above problems when compiling in release?

Share this post


Link to post
Share on other sites
Advertisement
You just have to link to the libs that you are linking to under Debug mode. The linker and compiler settings do not carry over between the modes, so you have to set both.

Share this post


Link to post
Share on other sites
Much thanks! That seemed like the problem when I read it, but I guess I just assumed any libraries you link to were there for either mode of compiling.

Thanks!

Share this post


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

  • Advertisement