SFML community forums
Help => General => Topic started by: TheCommunistDuck on July 28, 2010, 02:02:40 pm
-
Hey.
Had several link issues, mainly since I was linking sfml-main-d.lib not sfml-system-d.lib. :roll:
However, this program does not link:
int main()
{
// Create the main window
sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
sf::Clock timer;
// Start main loop
bool Running = true;
while (Running)
{
//App.Display();
}
return EXIT_SUCCESS;
}
And link errors:
error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Window::Window(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings const &)" (__imp_??0Window@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@1@@Z) referenced in function _main
I link to sfml-graphics-d.lib sfml-system-d.lib, and define SFML_DYNAMIC.
DLLs are in my obj folder, my bin folder, and my src folder.
I think it's not the DLLs, since removing them gets no change.
Thanks.
-
I think you forgot to link with sfml-window-d.lib
Read the tutorial, all is explained in it. :wink:
You have to link in this order:
sfml-graphics-d.lib
sfml-window-d.lib
sfml-system-d.lib
Of course, the definition of SFML_DYNAMIC is correct.
-
Sorry, that's a post typo. I have linked to sfml-window-d.lib, just forgot to type that. Whoops.
I've linked to sfml-main-d.lib as well, and added -s for static, and it's fine. However I still can't dynamically link.