I’m getting this linker error when compiling wxWidgets in Visual Studio 2010.
msvcrt.lib(wcrtexew.obj) : error LNK2001: unresolved external symbol _wWinMain@16
Now here’s the problem. The entry point for wxWidgets is this macro:
IMPLEMENT_APP(MyApp)
Which means I don’t use wWinMain() as an entry.
I’ve tried disabling the entry point when I compile (/NOENTRY), but no dice. Nothing seems to work because if I define wWinMain(), then wxWidgets won’t start because the entry is IMPLEMENT_APP.
I only receive this error when I compile as static. If I don’t compile as static I’ll have to supply the DLLs: msvcp100d.dll and msvcr100d.dll on Windows Server 2008 (and maybe more DLLs on older versions of Windows that don’t have the library installed).
Now I understand I am linking again the debug library, but it shouldn’t matter if I link again the release because I should receive the same error (unresolved external symbol _wWinMain@16).
Any solutions?
First compile wxWidgets’ Library (wxWidgets\build\msw) all with the same settings you have in your project. So I enable “/MT”, “Use MFC in a Static Library”, and output the projects as “Release”. Same exact settings on my wxWidgets’ application I coded.
Now Comment out:
And use this for your entry point: