문제

I am using Qt for GUI and building my project in waf. For switching to windows subsystem from console(default) i had to pass this argument to the VS linker throught my wscript(waf)

subsystem='windows' 

i added this in build part for waf file and I am getting this error

MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
C:\cygwin\home\sobingt\project\build\src\View\app.exe : fatal error LNK1120: 1 unresolved externals

I want to run this program as windows not as console.The Code works if i run it as console

subsystem='console' 
도움이 되었습니까?

해결책

You need to link against qtmain.lib (IIRC). This provides a shim around winmain which you need for windowed windows apps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top