# VC++ 2010 build

## Recommended Posts

So I'm writing a program that uses dx7(i know it's old) with VC++ express 2010. I can build my project just fine in Debug mode. It compiles and executes. When I switch to Release mode however, I get this error:

1>DDFuncs.obj : error LNK2001: unresolved external symbol _DirectDrawCreateEx@16
1>DDFuncs.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw7

Could someone just go through a list of what might be wrong with this? Thanks folks.

##### Share on other sites
Did you add the correct libraries to both your debug and release configuration? You have to set them for each case.

##### Share on other sites
Quote:
 Original post by karwostsDid you add the correct libraries to both your debug and release configuration? You have to set them for each case.

If you're talking about Project->Properties->Configuration Properties-Linker->Input, ddraw.lib and dxguid.lib are included, along with a bunch of other libraries which aren't listed in the Debug mode.

Phew that was a mouthful

ddraw.lib;dxguid.lib;%(AdditionalDependencies)

Release

ddraw.lib;dxguid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)

##### Share on other sites
Quote:
 Could someone just go through a list of what might be wrong with this

That version of DirectX is not supported by the compiler, in fact only June 2010 has support for Vs2010.

##### Share on other sites
Okay, I thought it might be something like that. I'm using the August 2009 DirectX SDK, because newer version don't seem to support DirectDraw at all. Oh well, guess I'll have to modernize.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628387
• Total Posts
2982402

• 10
• 9
• 16
• 24
• 11