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

Author Topic: Entry Point Not Found - unable to run SFML c++ exe file.  (Read 2866 times)

0 Members and 1 Guest are viewing this topic.

timebender

  • Newbie
  • *
  • Posts: 6
    • View Profile
Entry Point Not Found - unable to run SFML c++ exe file.
« on: August 20, 2022, 04:41:33 pm »
I have been trying to install the SFML library on VSCode, however when I try to run the .exe file, several errors pop up (windows dialog messages)
"the procedure entry point __gxx_personality_v0 could not be located in the dynamic link library C:/Users/Uporabnik/Documents/c/c++/O'elliy books/SFML_test/app.exe."

"the procedure entry point
_ZNKSt7__cxx1112basic_stringlcSt11char_traitslcESalcEE12find_last_ofEPKcjj could not be located in the dynamic link library C:/lib/SFML-2.5.1/bi/sfml-graphics-2.dll."

and repeat he last error for sfml-system-2.dll, sfml-window_2.dll.

What I have done so far:
Followed this video (among others)
(https://www.youtube.com/watch?v=Ptw1KKI9_Sg&t=299s&ab_channel=AhmedSamir)

Installed VSCode (working fine with other projects, not sure about third party libraries since this is the first one)

Installed minGW 8.1 64 bit (version I usually use) and minGW 32 bit 7.3.0 (compatible with SFML, downloaded from SFML 2.5.1 download page)

Added environmental variables for mingw/lib and SFML/bin

Made sure that minGW 32 is before 64 in env. var.

Made sure that the compiler I use with VSCode is 7.3.0 (g++ --version)
"g++.exe (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 7.3.0"

c_cpp_properties.json VSCode file added include path: "C:/lib/SFML-2.5.1/include"

Used the SFML tutorial example on: https://www.sfml-dev.org/tutorials/2.5/start-vc.php
(green circle on black screen)

compiled with:
g++ -I C:\lib\SFML-2.5.1\include -c test.cpp -o test.o -m32 
g++ -LC:/lib/SFML-2.5.1/lib ./test.o -o application.exe -lmingw32 -lsfml-graphics -lsfml-window -lsfml-system -lsfml-main -mwindows -m32

(works fine until now)

and finally:
double click on application.exe

And this is when the errors pop up.

Additional info:
I am using Windows 10 x64, VSCode, SFML for 32 bit.
VSCode is working fine for me, compiled dozens of projects without issue.

This is not the only time I tried using SFML, the previous time was about a year ago, but then I had the
#include <SFML/Graphics.hpp> //no such file or directory exists.

I am probably giving way too much details, but after 8 hours of my life spent on this, I want the solution as fast as possible.

Thank you in advance.









eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: Entry Point Not Found - unable to run SFML c++ exe file.
« Reply #1 on: August 22, 2022, 03:09:25 am »
You probably copied at one point the libgcc and libstdc++ DLL from a different MinGW installation next to your exe.
Make sure you use the ones provided by the downloaded MinGW 7.3.0, copy out of the bin/ directory.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

timebender

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Entry Point Not Found - unable to run SFML c++ exe file.
« Reply #2 on: August 22, 2022, 10:30:24 am »
You probably copied at one point the libgcc and libstdc++ DLL from a different MinGW installation next to your exe.
Make sure you use the ones provided by the downloaded MinGW 7.3.0, copy out of the bin/ directory.
I just re downloaded mingw32 & SFML for mingw (DF2) from the SFML-2.5.1 download page, extracted them and replaced the files. Followed the process in the video and there are still errors.

Additional info:
I followed this video:
https://www.youtube.com/watch?v=rZE700aaT5I&lc=UgzLU_bnKzbQ00jtyiR4AaABAg&ab_channel=BoostMyTool

And found out something more; Building a project dinamically still results in same errors, but doing it statically, results in only this error;

"the procedure entry point
_ZNKSt7__cxx1112basic_stringlcSt11char_traitslcESalcEE12find_last_ofEPKcjj could not be located in the dynamic link library "C:\...\sfml-app.exe"

which is strange. Why would it be dynamic link library if the app is built statically?

timebender

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Entry Point Not Found - unable to run SFML c++ exe file.
« Reply #3 on: August 22, 2022, 10:36:27 am »
Not sure how much it helps, but I took the .exe file to another computer (that doesn't have mingw, sfml, or any coding related program)

It still had errors, but they were different this time.
One was:
Unable to find: libgcc_s reinstalling the program may help.
The other:
Something about stdlib

timebender

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Entry Point Not Found - unable to run SFML c++ exe file.
« Reply #4 on: August 23, 2022, 06:05:51 pm »
UPDATE: switched to x64 and now it works. Don't know why the change but it works. Neat. Still no idea why it doesn't work on x32

 

anything