c++ - Qt aplication in Visual Studio - entry point -


i have console application in qt, execute in visual studio, can use it's profiler.

i'm using plugin called qt vs tool, seems have imported project correctly. can create new qt project , works fine.

however on application imported, vs seems searching winmain function entry point instead of main, if "subsystem" set console (/subsystem:console) in configuration properties -> linker -> system -> subsystem.

i getting error:

lnk2019 unresolved external symbol winmain referenced in function __tmaincrtstartup

if manually change entry point "main", in configuration properties -> linker -> advanced -> entry point, application starts, argc , argv contain trash. seems not possible pass arguments when specifying entry point.

how can make work int main(int argc, char *argv[]) ?

i'm using vs 2015 community msvc 11 compiler (vs 2012) due library.

the solution found set entry point maincrtstartup in configuration properties -> linker -> advanced -> entry point. difference between main , maincrtstartup discussed here.

doing that, arguments passed correctly main function.


Comments