Monday, 6 February 2017

c++ - Linker error: unresolved external symbol _WinMain@16 when building console application

I'm trying to compile this code is Visual Studio 2015:



int main()
{

double* pvalue = NULL;
pvalue = new double;

*pvalue = 29494.99;
cout << "Value of pvalue : " << *pvalue << endl;

delete pvalue;

return 0;
}



And i'm getting this compile error:



1>MSVCRTD.lib(exe_winmain.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)



Is this a Visual Studio problem? Should I reinstall it?

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...