Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Problems with DLL  (Read 2853 times)

0 Members and 1 Guest are viewing this topic.

MikeProgrammer

  • Newbie
  • *
  • Posts: 1
    • View Profile
Problems with DLL
« on: August 25, 2024, 05:03:45 pm »
Hi everyone i am on windows and I struggles with launching the executable smfl-app generated by my compiler. I am on a 64 bits system and i use mingw64 and especially g++ to compile my main.cpp . Everything works great to get the .o file and then the executable but when i try to run i, i got an error saying :
The entry point of the procedure _ZNSt15basic_streambuflcSt11char_traitslcEE7seekposESt4posliESt13_los_Openmode could not be located in the dynamic link library "PathToMyCodingFolder"/sfml-system-2.dll . So to explain my installation, I downloaded sfml directly from the website choosing GCC 13.1.0 MinGW (SEH) - 64-bit. And in the same of my main.cpp, I put all the dll files located in bin, and i also put the lib and the include directory.
To compile I used thoses commands :
g++ -c main.cpp -Iinclude
g++ main.o -o sfml-app -Llib -lsfml-graphics -lsfml-window -lsfml-system
I am not very familiar with compiling and all thoses stuff so my non-understanding of c++ can be the source of why it doesn't work.
Tell me if my explaination isn't clear enough.
Thank you

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Problems with DLL
« Reply #1 on: August 25, 2024, 11:53:52 pm »
If you download the SFML pre-built binaries from the website, you should also download the linked compilers on the website as well, otherwise you'll run into runtime compatibility issues.

Alternative, you can also use the SFML CMake Template, which will build SFML with your project and thus can't cause issues with runtimes.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything