compile options


When I try to compile with
Linker->System->Subsystem->Windows (/SUBSYSTEM:WINDOWS)

I got this error
MSVCRT.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16

Does anybody know how to solve this?


Can you provide more information on what you are trying to do?

googling the error gets several pages that address the issue and show possible solutions:…-1ueswm.htm

From: (copy and past whole url - then scroll down the page)…-rtexew.obj+:+error+LNK2001:+unresolved+external+symbol+_WinMain%4016&hl=en&ct=clnk&cd=4&gl=us&client=safari

If it has int main() or void main() as the entry point, make sure that it uses the console subsystem. If you use int WINAPI WinMain() as the entry point, use the windows subsystem. I’m betting that you want the console subsystem. To change this, go to Project->Settings->Link and change it to /subsystem:console in the Project Options box at the bottom. Good luck.

Are you trying to make a non console based application?

hello Theo Watson :smiley:

trying to get rid of the console. I just change to WinMain and that did it.