I have an application that compiles and works fine when I dynamically link everything, but when I want to have a static build of it, it will not compile.
In Visual Studio 2010, I set the "Use MFC in a Static Library" option.
When I do that, I get this error:
Error 1 error LNK2001: unresolved external symbol _wWinMain@16 LIBCMT.lib(wwincrt0.obj)
I have tried adding LIBCMT.lib as an additional library, but that doesn't change anything.
Any ideas on how to fix this problem?
From the message that it's missing WinMain that implies to me that some piece of your project is being built as an application and NOT as a library.
Try a full rebuild and ensure that all relevant options are set to build a static library. I believe libcmt.lib should only be linked to your final application, NOT to the library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With