Public Group

# problem in release

This topic is 4336 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

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

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• 10
• 11
• 13
• 9
• 11
• ### Forum Statistics

• Total Topics
634092
• Total Posts
3015437
×