I have a Visual Studio working project that uses wmain() as an entry point. Instead, I would like to use main() .
wmain()
main()
If I just change the signature of the function to int main() , I get:
int main()
LNK2019 error: unresolved external _wmain character specified in function "void __cdecl mainCRTStartupHelper (struct HINSTANCE__ *, unsigned short const *)"
What parameter do I need to change to make the link successful?
I found a solution, guessing.
Configuration Properties > Linker > Advanced > Entry Point
was: mainWCRTStartup
mainWCRTStartup
now: mainCRTStartup ## deleted W
mainCRTStartup
W
Assembly completed successfully.
Insert the pragma into the source file before int main() .
#pragma comment (linker, "/ SUBSYSTEM: CONSOLE / ENTRY: mainCRTStartup")
In the Visual Studio project configuration, change the character set to Use multibyte character set .
Source: https://habr.com/ru/post/1495411/More articles:jQuery find the closest element - jqueryCannot open memory mapped file from login screen - c #Access denied - c #How to use transclude without a template in Angular directive? - javascriptEndless loop with two randomly walking turtles - pythonhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1495412/assign-wcs-coordinates-to-a-fits-image&usg=ALkJrhhiNfOmKMdUyt4n1tloKR0YSfW4hAWhen is a weak link updated to zero in Objective-C? - pointersOOP: object class change after operation - operations are no longer required - oopgpg: processing message failed: eof; Unix Error ksh GPG Decryption Script - unixIf I use SSLSocket in Android and hard code, is the proxy access code in the source code unsafe? - javaAll Articles