SFML community forums
Help => Window => Topic started by: gtx on August 28, 2019, 06:39:51 pm
-
Hello
I am getting the error
the procedure entry point
_ZN2sf6Cursor14loadFromPielsEPKhNS_7VectorsljEES4_could not be located in the dynamic link library
when i try to use sf::Cursor
using windows 10,sfml2.5.1 and codeblocks mingw
everyother part sfml works idk why this does not
i even checked and cursor is in the window header so idk
main.cpp
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window{{1024, 756}, "Hello World"};
window.setVerticalSyncEnabled(true);
sf::Cursor cursor;
cursor.loadFromSystem(sf::Cursor::Arrow);
window.setMouseCursor(cursor);
}
window.hpp
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/System.hpp>
#include <SFML/Window/Clipboard.hpp>
#include <SFML/Window/Context.hpp>
#include <SFML/Window/ContextSettings.hpp>
#include <SFML/Window/Cursor.hpp>
#include <SFML/Window/Event.hpp>
#include <SFML/Window/Joystick.hpp>
#include <SFML/Window/Keyboard.hpp>
#include <SFML/Window/Mouse.hpp>
#include <SFML/Window/Sensor.hpp>
#include <SFML/Window/Touch.hpp>
#include <SFML/Window/VideoMode.hpp>
#include <SFML/Window/Window.hpp>
#include <SFML/Window/WindowHandle.hpp>
#include <SFML/Window/WindowStyle.hpp>
-
Try to delete the SFML DLLs next to your exe and copy the SFML DLLs again from the SFML package you downloaded next to the exe.
-
i did and now im getting
||=== Build: Debug in testifsfmlworks (compiler: GNU GCC Compiler) ===|
obj\Debug\src\main.o||In function `main':|
C:\Users\gustx\Desktop\testifsfmlworks\src\main.cpp|21|undefined reference to `_imp___ZNK2sf10WindowBase6isOpenEv'|
C:\Users\gustx\Desktop\testifsfmlworks\src\main.cpp|24|undefined reference to `_imp___ZN2sf10WindowBase9pollEventERNS_5EventE'|
||error: ld returned 1 exit status|
||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
-
The SFML header files and the DLLs you just copied are not from the same SFML version.
I suggest to delete the existing SFML headers and copy over the SFML headers from the same download you just copied the DLLs from.