I have similar issue, but in my case the app won't compile if I set Subsystem to Windows. I get heaps of link errors, looking like this:
1>------ Build started: Project: SFML_GL_test, Configuration: Release x64 ------
1>Build started 2012.03.15. 15:08:19.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(299,5): warning MSB8004: Output Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.
1>InitializeBuildStatus:
1> Creating "x64\Release\SFML_GL_test.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>ClCompile:
1> All outputs are up-to-date.
1>Link:
1> All outputs are up-to-date.
1>libcmt.lib(crt0dat.obj) : error LNK2005: _initterm_e already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0dat.obj) : error LNK2005: exit already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0dat.obj) : error LNK2005: _cexit already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0dat.obj) : error LNK2005: _amsg_exit already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(crt0init.obj) : error LNK2005: __xi_a already defined in MSVCRT.lib(cinitexe.obj)
1>libcmt.lib(crt0init.obj) : error LNK2005: __xi_z already defined in MSVCRT.lib(cinitexe.obj)
1>libcmt.lib(crt0init.obj) : error LNK2005: __xc_a already defined in MSVCRT.lib(cinitexe.obj)
1>libcmt.lib(crt0init.obj) : error LNK2005: __xc_z already defined in MSVCRT.lib(cinitexe.obj)
1>libcmt.lib(winxfltr.obj) : error LNK2005: _XcptFilter already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(memcpy.obj) : error LNK2005: memmove already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(mlock.obj) : error LNK2005: _unlock already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(mlock.obj) : error LNK2005: _lock already defined in MSVCRT.lib(MSVCR100.dll)
1>libcmt.lib(errmode.obj) : error LNK2005: __set_app_type already defined in MSVCRT.lib(MSVCR100.dll)
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>MSVCRT.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>D:\ToBeSaved\Develop\SFML_GL_test\\bin\SFML_GL_test.exe : fatal error LNK1169: one or more multiply defined symbols found
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.28
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I try to link the following libraries:
sfml-main.lib;sfml-system.lib;sfml-window.lib;sfml-graphics.lib;opengl32.lib;glu32.lib;GLEW64.lib;
Could someone explain though how this would work in theory? My application's entry point is "int main()" although if I set Subsystem to Windows it should be looking for a WinMain function. How can a dynamically linked library override that? It certainly does something, since it does not argue about WinMain not being present, but I'm curious what exactly happens under the hood. Plus, the program compile as it is, so I would like to know what I'm doing wrong. Thx in advance.