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

Author Topic: sfml-graphics-2.dll: procedure entry point not found  (Read 2148 times)

0 Members and 1 Guest are viewing this topic.

sanjay

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
sfml-graphics-2.dll: procedure entry point not found
« on: November 30, 2015, 07:28:05 am »
Hi All,
Its my first post on the forum after burning a lot of hours in debugging/searching this issue.
I compiled SFML-2.3.2-windows-gcc-4.8.1-tdm-32-bit using g++ (tdm-1) 5.1.0. Hoping that GCC 5.1 (TDM) should still be fine to compile SFML-2.3.2 as mentioned above.

The compilation went well and I could run a simple RenderWindow.

However, now when I'm trying to add some graphics using sf::Texture, the code compiles well.
Following steps summarize the compilation

g++ "-IC:\\Dev Work\\PP\\SFML\\include" -O0 -g3 -Wall -std=c++11 -c -fmessage-length=0 -o main.o "..\\main.cc"
g++ "-LC:\\Dev Work\\PP\\SFML\\build5\\lib" -o TestSFML.exe main.o -lsfml-graphics -lsfml-window -lsfml-system

But, when I run the executable. I get the following error

"The procedure entry point sf::Texture::loadFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, sf::Rect<int> const&)
 could not be located in the dynamic link library sfml-graphics-2.dll"

Which probably means that my SFML is compiled without C++11 flag on? (I'm not sure if there's a way to confirm that).

Then I tried compiling SFML by inserting the following line in CMakeLists. I
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

However, I still get the same error. I'm a little new to Windows Environment. Would really appreciate any help on this issue?

thanks

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: sfml-graphics-2.dll: procedure entry point not found
« Reply #1 on: November 30, 2015, 08:11:18 am »
If you use the TDM 5.1 compiler, you can't use the TDM 4.8.1 package, they are not compatible. Instead you have to rebuild SFML itself with your new compiler.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

sanjay

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: sfml-graphics-2.dll: procedure entry point not found
« Reply #2 on: November 30, 2015, 05:47:11 pm »
Thanks for your response.
I cloned the latest code from git, and recompiled SFML with the same compiler GCC TDM 5.1. Still I get the same error, not sure what am I missing. I'll spend some more time on it.

sanjay

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: sfml-graphics-2.dll: procedure entry point not found
« Reply #3 on: November 30, 2015, 05:57:43 pm »
It turned out to be linkage of wrong dll with my executable. I found windows clone of ldd and that helped me in resolving the issue!

thanks