I\'m making an application in Qt Creator, with cmake and MinGW as compiler. I\'ve seen this question being answered for other people, but they used regular Qt projects with .pro
I had the same issue, but solved it by adding:
#CMakeLists.txt
# ... some text (like finding QT)
LINK_LIBRARIES(${QT_QTMAIN_LIBRARY})
# ... and then
ADD_EXECUTABLE(my_qt_project WIN32 ... )
If I don't use LINK_LIBRARIES(${QT_QTMAIN_LIBRARY})
I get error:
error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup