SFML community forums

Help => General => Topic started by: xumepoc on March 12, 2014, 08:16:28 am

Title: Use Multi-Byte Character set problems
Post by: xumepoc on March 12, 2014, 08:16:28 am
Hi everyone, I am thinking to move from GDI UI (MFC project) to SFML, because Direct2D is just slow and I get low FPS.
For now I just want to play a bit with SFML to see it's capabilities, but I need to run it in "Use Multi-Byte Character Set", because that is the requirement in the MFC project I will need it. But when I run the simple test project I get linking errors:

Error   3   error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in libcmtd.lib(typinfo.obj)   msvcrtd.lib
Error   4   error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in libcmtd.lib(typinfo.obj)   msvcrtd.lib
Error   6   error LNK2019: unresolved external symbol _main referenced in function _WinMain@16   sfml-main-d.lib
Error   7   fatal error LNK1120: 1 unresolved externals   F:\SFML\Test\Test\Debug\Test.exe   1


When using Unicode set, everything is OK. Isn't the SFML 2.1 compiled in Mulit-Byte or I have to compile it myself for this?
Title: Re: Use Multi-Byte Character set problems
Post by: eXpl0it3r on March 12, 2014, 09:06:49 am
Not sure what SFML is compiled with, but it seems there's a conflict thus the easiest solution would be to rebuild yourself.

Also if you link against sfml-main(-d), you'll have to define the entry point main(). If you already use your WinMain() entry point, then you don't necessarily link against sfml-main. ;)