SFML community forums
Help => General => Topic started by: stalker2106 on August 03, 2017, 02:11:35 pm
-
Hello, i've been developping a game engine based on SFML for quite a while now, and after some refactoring for the project to compile under MinGW, it wont compile anymore on visual studio. Diffs on git show me neither the project file nor the built bins are modified since. thought, checkout of the old revision compiles, and HEAD doesnt.
I added all sfml-*-d.lib to linker options in VS2013(x86_win32). I also added the sfml-main-d.lib (because i generate a .dll)
I built those binaries with CMAKE and VS2013(x86_win32)
The linker gives the following error:
unresolved external symbol "private: virtual bool __thiscall sf::RenderWindow::activate(bool)" (?activate@RenderWindow@sf@@EAE_N_N@Z)
everything links but activate. Where should I look ? i've been struggling recompiling sfml a few times and messing with libs input in visual studio.. why ONLY this method wouldn't link ? I don't even call it in my code.
EDIT: repo for curious/testing https://bitbucket.org/stalker2106/stbxengine/
Thanks for your help.
Maxime.
-
That function was added at a later point in timr, so I assume you've updated the SFML header files to a newer version but forgot to update the .lib and/or .dll files.
-
Hi eXpl0it3r, thanks for your time.
I just pulled the latest commit of SFML repo; compiled them with cmake for vs2013 x86_i386
Visual studio still hangs with the same linker error.
Are you sure about includes ? because it looks like the sengine.dll (my lib) uses that method which is nowhere to find inside lsfml linked binaries... at least that's how I interpret the linker error.
(reminder; whole error) :
Error 25 error LNK2001: unresolved external symbol "private: virtual bool __thiscall sf::RenderWindow::activate(bool)" (?activate@RenderWindow@sf@@EAE_N_N@Z) W:\Projets\stbxengine\vs\Test\libsengine.dll(Engine.obj) Test
-
Actually it's the other way around, SFML is updated but your headers or rather some of them have not been updated.
The RenderTarget.hpp file (https://bitbucket.org/stalker2106/stbxengine/src/1a1c678e2538e15bd0e80ce43af6ad78abfe3391/include/SFML/Graphics/RenderTarget.hpp?at=master&fileviewer=file-view-default) in your repository is not that one that matches SFML 2.4.2 (https://github.com/SFML/SFML/blob/master/include/SFML/Graphics/RenderTarget.hpp) and that private activate() function has been removed (https://github.com/SFML/SFML/blob/master/include/SFML/Graphics/RenderTarget.hpp#L365), thus leading to issues.
At best you just delete the SFML directory in your repo and replace it completely with the new one. ;)
-
Oh. A coworker did commit an unexpected "SFML" include folder in my include folder... I did not check that out haha... my mistake, sorry for bothering!
Regards,
Max