How can I setup a plain c++ project and continue developing it using qt creator and qmake build system (in windows!)
My Qt Creator works perfectly fine with qt projects. I am using MSVC2017-64 as my compiler.
I tried to setup a project like this
myproject.pro
CONFIG -= qt
CONFIG += c++17
DEFINES -= UNICODE QT_LARGEFILE_SUPPORT
SOURCES += \
main.cpp
HEADERS += \
main.h
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
main.cpp
#include "main.h"
#include <iostream>
int main(int argsCount, char** argsArray) {
puts("Hello, World!");
return 0;
}
main.h
#ifndef MAIN_H
#define MAIN_H
#endif // MAIN_H
And here is how my project page looks like:
But after all this when I try to build/compile I get this error:
MSVCRTD.lib(exe_winmain.obj):-1: error: LNK2019: unresolved external symbol WinMain referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)
debug\WAVE2.exe:-1: error: LNK1120: 1 unresolved externals
What am I missing here?