I am having problems linking non-qt console application using qtCreator, vs2015 kit.
The error I am getting is:
MSVCRTD.lib(exe_winmain.obj):-1:
error: LNK2019: unresolved external symbol _WinMain@16 referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)
I will appreciate advise or comment what I am doing wrong here.
My .pro file is:
TEMPLATE = app
CONFIG += console c++11
CONFIG -= qt
LIBS = kernel32.lib \
user32.lib \
gdi32.lib
#LIBS += -L"$(BOOST)/stage/lib"
SOURCES += main.cpp
TEMPLATE = app
CONFIG += console c++11
CONFIG -= qt
LIBS = kernel32.lib \
user32.lib \
gdi32.lib
#LIBS += -L"$(BOOST)/stage/lib"
SOURCES += main.cpp
To copy to clipboard, switch view to plain text mode
My main.cpp file is:
#include <iostream>
using namespace std;
int main() //(int argc, char * argv[]) , I tried main with and without arguments, with and without "void"
{
cout << "Hello World!" << endl;
return 0;
}
#include <iostream>
using namespace std;
int main() //(int argc, char * argv[]) , I tried main with and without arguments, with and without "void"
{
cout << "Hello World!" << endl;
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks