Sign in to follow this  
trick

problem in release

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this