I managed to build it with Cmake. I'm using static libraries instead of dynamic libraries.
I'm getting bunch of linking errors right now.
What I did:
- Built SFML in Multi-Threaded runtime library setting with VS 2012
- Created a new project and set the additional include and library directories
- put sfml-graphics-s.lib and sfml-window-s.lib in the additional dependencies (release)
- put sfml-graphics-s-d.lib and sfml-window-s-d.lib in the additional dependencies (debug)
- defined SFML_STATIC
- set the Runtime Library to Multi-Threaded
Error messages in debug build
1>------ Build started: Project: TESTR, Configuration: Debug Win32 ------
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::close(void)" (__imp_?close@Window@sf@@QAEXXZ) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::isOpen(void)const " (__imp_?isOpen@Window@sf@@QBE_NXZ) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::pollEvent(class sf::Event &)" (__imp_?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::display(void)" (__imp_?display@Window@sf@@QAEXXZ) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (__imp_??0Color@sf@@QAE@EEEE@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::clear(class sf::Color const &)" (__imp_?clear@RenderTarget@sf@@QAEXABVColor@2@@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::draw(class sf::Drawable const &,class sf::RenderStates const &)" (__imp_?draw@RenderTarget@sf@@QAEXABVDrawable@2@ABVRenderStates@2@@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,struct sf::ContextSettings const &)" (__imp_??0RenderWindow@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IABUContextSettings@1@@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (__imp_??1RenderWindow@sf@@UAE@XZ) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Shape::setFillColor(class sf::Color const &)" (__imp_?setFillColor@Shape@sf@@QAEXABVColor@2@@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::CircleShape::CircleShape(float,unsigned int)" (__imp_??0CircleShape@sf@@QAE@MI@Z) referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::CircleShape::~CircleShape(void)" (__imp_??1CircleShape@sf@@UAE@XZ) referenced in function _main
1>Source.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::Color const sf::Color::Green" (__imp_?Green@Color@sf@@2V12@B)
1>Source.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::RenderStates const sf::RenderStates::Default" (__imp_?Default@RenderStates@sf@@2V12@B)
1>c:\users\park\documents\visual studio 2012\Projects\TESTR\Debug\TESTR.exe : fatal error LNK1120: 15 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
in release
1>------ Build started: Project: TESTR, Configuration: Release Win32 ------
1>sfml-graphics-s.lib(Shape.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(RenderWindow.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(Color.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(RenderStates.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(CircleShape.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(RenderTarget.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(Transform.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(Transformable.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(VertexArray.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(Texture.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(Image.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(View.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(Shader.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(GLCheck.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(TextureSaver.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-window-s.lib(Window.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-window-s.lib(VideoMode.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-window-s.lib(GlContext.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-window-s.lib(WindowImpl.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-window-s.lib(VideoModeImpl.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-window-s.lib(WglContext.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-window-s.lib(JoystickManager.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>sfml-window-s.lib(JoystickImpl.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>libcpmt.lib(locale0.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>libcpmt.lib(ios.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>libcpmt.lib(iosptrs.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>libcpmt.lib(locale.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>libcpmt.lib(xlock.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>libcpmt.lib(xthrow.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>libcpmt.lib(wlocale.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>libcpmt.lib(xlocale.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>libcpmt.lib(xdateord.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in Source.obj
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>sfml-graphics-s.lib(Texture.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Mutex::Mutex(void)" (??0Mutex@sf@@QAE@XZ)
1>sfml-window-s.lib(GlResource.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Mutex::Mutex(void)" (??0Mutex@sf@@QAE@XZ)
1>sfml-window-s.lib(GlContext.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Mutex::Mutex(void)" (??0Mutex@sf@@QAE@XZ)
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Mutex::Mutex(void)" (??0Mutex@sf@@QAE@XZ)
1>sfml-graphics-s.lib(Texture.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Mutex::~Mutex(void)" (??1Mutex@sf@@QAE@XZ)
1>sfml-window-s.lib(GlResource.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Mutex::~Mutex(void)" (??1Mutex@sf@@QAE@XZ)
1>sfml-window-s.lib(GlContext.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Mutex::~Mutex(void)" (??1Mutex@sf@@QAE@XZ)
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Mutex::~Mutex(void)" (??1Mutex@sf@@QAE@XZ)
1>sfml-graphics-s.lib(Texture.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Lock::Lock(class sf::Mutex &)" (??0Lock@sf@@QAE@AAVMutex@1@@Z)
1>sfml-window-s.lib(GlResource.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Lock::Lock(class sf::Mutex &)" (??0Lock@sf@@QAE@AAVMutex@1@@Z)
1>sfml-window-s.lib(GlContext.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Lock::Lock(class sf::Mutex &)" (??0Lock@sf@@QAE@AAVMutex@1@@Z)
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Lock::Lock(class sf::Mutex &)" (??0Lock@sf@@QAE@AAVMutex@1@@Z)
1>sfml-graphics-s.lib(Texture.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Lock::~Lock(void)" (??1Lock@sf@@QAE@XZ)
1>sfml-window-s.lib(GlResource.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Lock::~Lock(void)" (??1Lock@sf@@QAE@XZ)
1>sfml-window-s.lib(GlContext.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Lock::~Lock(void)" (??1Lock@sf@@QAE@XZ)
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Lock::~Lock(void)" (??1Lock@sf@@QAE@XZ)
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl sf::err(void)" (?err@sf@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@XZ)
1>sfml-window-s.lib(Window.obj) : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl sf::err(void)" (?err@sf@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@XZ)
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl sf::err(void)" (?err@sf@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@XZ)
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl sf::err(void)" (?err@sf@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@XZ)
1>sfml-graphics-s.lib(Texture.obj) : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl sf::err(void)" (?err@sf@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@XZ)
1>sfml-graphics-s.lib(Image.obj) : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl sf::err(void)" (?err@sf@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@XZ)
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl sf::err(void)" (?err@sf@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@XZ)
1>sfml-graphics-s.lib(GLCheck.obj) : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl sf::err(void)" (?err@sf@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@XZ)
1>sfml-window-s.lib(Window.obj) : error LNK2001: unresolved external symbol "class sf::Time __cdecl sf::seconds(float)" (?seconds@sf@@YA?AVTime@1@M@Z)
1>sfml-window-s.lib(Window.obj) : error LNK2001: unresolved external symbol "bool __cdecl sf::operator!=(class sf::Time,class sf::Time)" (??9sf@@YA_NVTime@0@0@Z)
1>sfml-window-s.lib(Window.obj) : error LNK2001: unresolved external symbol "class sf::Time __cdecl sf::operator-(class sf::Time,class sf::Time)" (??Gsf@@YA?AVTime@0@V10@0@Z)
1>sfml-window-s.lib(Window.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Clock::Clock(void)" (??0Clock@sf@@QAE@XZ)
1>sfml-window-s.lib(JoystickImpl.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::Clock::Clock(void)" (??0Clock@sf@@QAE@XZ)
1>sfml-window-s.lib(Window.obj) : error LNK2001: unresolved external symbol "public: class sf::Time __thiscall sf::Clock::getElapsedTime(void)const " (?getElapsedTime@Clock@sf@@QBE?AVTime@2@XZ)
1>sfml-window-s.lib(JoystickImpl.obj) : error LNK2001: unresolved external symbol "public: class sf::Time __thiscall sf::Clock::getElapsedTime(void)const " (?getElapsedTime@Clock@sf@@QBE?AVTime@2@XZ)
1>sfml-window-s.lib(Window.obj) : error LNK2001: unresolved external symbol "public: class sf::Time __thiscall sf::Clock::restart(void)" (?restart@Clock@sf@@QAE?AVTime@2@XZ)
1>sfml-window-s.lib(JoystickImpl.obj) : error LNK2001: unresolved external symbol "public: class sf::Time __thiscall sf::Clock::restart(void)" (?restart@Clock@sf@@QAE?AVTime@2@XZ)
1>sfml-window-s.lib(Window.obj) : error LNK2001: unresolved external symbol "void __cdecl sf::sleep(class sf::Time)" (?sleep@sf@@YAXVTime@1@@Z)
1>sfml-window-s.lib(WindowImpl.obj) : error LNK2001: unresolved external symbol "void __cdecl sf::sleep(class sf::Time)" (?sleep@sf@@YAXVTime@1@@Z)
1>sfml-window-s.lib(Window.obj) : error LNK2001: unresolved external symbol "public: static class sf::Time const sf::Time::Zero" (?Zero@Time@sf@@2V12@B)
1>sfml-window-s.lib(GlContext.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::ThreadLocal::ThreadLocal(void *)" (??0ThreadLocal@sf@@QAE@PAX@Z)
1>sfml-window-s.lib(GlContext.obj) : error LNK2001: unresolved external symbol "public: __thiscall sf::ThreadLocal::~ThreadLocal(void)" (??1ThreadLocal@sf@@QAE@XZ)
1>sfml-window-s.lib(GlContext.obj) : error LNK2001: unresolved external symbol "public: void __thiscall sf::ThreadLocal::setValue(void *)" (?setValue@ThreadLocal@sf@@QAEXPAX@Z)
1>sfml-window-s.lib(GlContext.obj) : error LNK2001: unresolved external symbol "public: void * __thiscall sf::ThreadLocal::getValue(void)const " (?getValue@ThreadLocal@sf@@QBEPAXXZ)
1>sfml-window-s.lib(WindowImpl.obj) : error LNK2001: unresolved external symbol "class sf::Time __cdecl sf::milliseconds(int)" (?milliseconds@sf@@YA?AVTime@1@H@Z)
1>sfml-window-s.lib(JoystickImpl.obj) : error LNK2001: unresolved external symbol "class sf::Time __cdecl sf::milliseconds(int)" (?milliseconds@sf@@YA?AVTime@1@H@Z)
1>sfml-window-s.lib(JoystickImpl.obj) : error LNK2001: unresolved external symbol "bool __cdecl sf::operator>(class sf::Time,class sf::Time)" (??Osf@@YA_NVTime@0@0@Z)
1>c:\users\park\documents\visual studio 2012\Projects\TESTR\Release\TESTR.exe : fatal error LNK1120: 19 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========