****NOTE****
Thread can be locked, re-built it using CMake and NMake instead of CMake and then build the solution from VS11, that did the trick.
(at least now I know how to do it properly for my next time!)
Anyway, thanks for trying to help me Laurent.
TO THOSE OF YOU WHO HAD THE SAME PROBLEM:
http://sfmlcoder.wordpress.com/2011/06/15/building-sfml-2-nmake/Follow that guide, it's made for VS10 but works just as fine for VS11.
Hi, I'm trying to get SFML2 to actually work for me... but, it refuses to just simply work. Therefore, after googling and searching on the forums (only answer I got from the forum was "make sure you have linked the libs", which I have done)... so, here I am - trying to make this work once and for all.
My problem: I'm using VS11 and it doesn't like my linkings, I guess.
1>------ Build started: Project: SFML2-Test, Configuration: Debug Win32 ------
1>Build started 2012-04-12 02:02:33.
1>InitializeBuildStatus:
1> Touching "Debug\SFML2-Test.unsuccessfulbuild".
1>ClCompile:
1> main.cpp
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>main.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>main.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>main.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>main.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>main.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>main.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>main.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>c:\users\nti\documents\visual studio 11\Projects\SFML2-Test\Debug\SFML2-Test.exe : fatal error LNK1120: 7 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.76
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
That's my output log, and here's my testcode to see if everything's working:
#include <SFML\Graphics.hpp>
int main()
{
sf::RenderWindow mainWindow(sf::VideoMode(800, 600, 32), "title");
while (mainWindow.isOpen())
{
mainWindow.clear(sf::Color(255, 255, 255));
mainWindow.display();
}
return 0;
}
Additional dependencies for Debug (which is what I'm trying to do right now, so my dependencies for Release doesn't matter right now - though it doesn't work there either..):
sfml-graphics-d.lib
sfml-audio-d.lib
sfml-window-d.lib
sfml-system-d.lib
sfml-network-d.lib
So, can someone tell me where I've screwed up?
At first I just thought it was somewhere with the CMake that didn't go well because I got an error, but I rebuilt it and got past that without any errors at all so I guess it should (observe, SHOULD) be working... in my world at least.
Tell me if you need any more info, and I'll happely give it to you if that might help someone help me.
Regard, me.
NOTE: It's 2:15 here, in the night - so I blame any misspellings and such on the time.
*edit*
Tried to rebuild all dll's and lib's, placing the new ones on a completely different place and I think you can guess how it went...
And I'm using CMake's VS11 Win64 setup for my build. And yes, I am running a 64-bit version of Windows 7. Also using an AMD GPU, seen something about SFML and AMD GPU's, but that'd not cause the linker errors...