# 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

Can anyone tell me why my program may compile fine in debug but have the above problems when compiling in release?

##### 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 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 on other sites
You can also set "All configurations" in project options to change libs for both.

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

• ### Forum Statistics

• Total Topics
627738
• Total Posts
2978881

• 10
• 10
• 21
• 14
• 13