Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What option do I set to use main() instead of wmain()

I have a working Visual Studio project that uses wmain() as the entry-point. I would like to use main() instead.

If I simply change the function signature to int main(), I get:

error LNK2019: unresolved external symbol _wmain referenced in function "void __cdecl mainCRTStartupHelper(struct HINSTANCE__ *,unsigned short const *)"

What option do I need to change to make the link succeed?

like image 340
Brent Bradburn Avatar asked Nov 12 '22 00:11

Brent Bradburn


1 Answers

I found a solution by guessing.

Configuration Properties > Linker > Advanced > Entry Point

was: mainWCRTStartup

now: mainCRTStartup ## removed W

Build succeeded.

like image 126
Brent Bradburn Avatar answered Jan 04 '23 01:01

Brent Bradburn