Code | Description | Project | File | Line |
LNK2019 | unresolved external symbol _WinMain@16 referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) | SFML_Tutorial01 | MSVCRTD.lib (exe_winmain.obj) | 1 |
LNK1120 | 1 Unresolved externals | SFML_Tutorial01 | SFML_Tutorial01.exe | 1 |
If you chose to create a "Windows application" project, the entry point of your code has to be set to "WinMain" instead of "main". Since it's Windows specific, and your code would therefore not compile on Linux or Mac OS X, SFML provides a way to keep a standard "main" entry point in this case: link your project to the sfml-main module ("sfml-main-d.lib" in Debug, "sfml-main.lib" in Release), the same way you linked sfml-graphics, sfml-window and sfml-system.