Library recompilation error in Visual Studio .Net 2003

I am try to compile release solution ApplicationFramework and receive error in project PAppStdPlugin:

------ Build started: Project: PAppStdPlugin, Configuration: Release Win32 ------

Creating library .\Release/PAppStdPlugin.lib and object .\Release/PAppStdPlugin.exp
LIBC.lib(wincrt0.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup

How to correct this error?

But debug version of this project where compiled without errors.

m-aronsson's picture

Hi !

It's the usual problem, no one has tested the release version, compare the linker options between the debug and the realease versions.

You get the error because the option are set so that the linker should produce a GUI application, but this requires a WinMain() function, the alternative is to produce a console application and then you will need a main() function instead.