-1

First of, IDEs are not my strong point. A question on my mind is: are the compiler settings and the project build settings the same thing? Because other than having debug and release, they both have compiler, linker settings and search directory options.

errors(s)

The procedure entry point _gxx-personality-v0 could not be located in the dynamic link library sfml-graphics-2.dll, sfml-window-2.dll, sfml-system-2.dll, sfml-audio-2.dll

(Even though I've put them with in the project bin folder along side the project .exe)

Details

inst dir    C:\Program Files (x86)\CodeBlocks    
CodeBlocks  17.12.0.1 
SFML        SFML-2.5.0-windows-gcc-7.3.0-mingw-32-bit
Build       Debug
C++14       (Have g++ follow the C++14 ISO C++ language standard)  
//
Linker Libaries   (SFML add dependencies must be in this order)
                               sfml-graphics        
                               sfml-window
                               sfml-system
                               sfml-audio
Compiler                C:\Program Files (x86)\CodeBlocks\SFML-2.5.0\include
Linker                  C:\Program Files (x86)\CodeBlocks\SFML-2.5.0\lib
Tool Chain Executables  C:\Program Files (x86)\CodeBlocks\MinGW
//

C:\Program Files (x86)\CodeBlocks\MinGW\bin                                (copied ddls to project bin folder)

C:\Program Files (x86)\CodeBlocks\SFML-2.5.0\bin                            (copied ddls to project bin folder)

Looks as if the project compiles, but can't execute.

1201ProgramAlarm
  • 32,384
  • 7
  • 42
  • 56
S_BISHOP
  • 31
  • 6
  • See if you can find your answer here https://stackoverflow.com/questions/329059/what-is-gxx-personality-v0-for. it explains which library contains the symbol and what you need to do. – bcperth Oct 04 '18 at 03:28
  • @bcperth thanks im researching the related post, but i honestly have no idea what your hinting at ? – S_BISHOP Oct 04 '18 at 03:38
  • The symbol that cant be found `__gxx_personality_v0` is defined in `libstdc++` which is probably missing. Try putting `void *__gxx_personality_v0;` in your code and see if link error disappears. – bcperth Oct 04 '18 at 03:54
  • @bcperth it didn't work, placed symbol void pointer in global program scope and rebuilt but nothing, there is howerver a libstdc++-6.dll in my project bin folder local to the executable, that i copied from the mingw bin, should it be there? – S_BISHOP Oct 04 '18 at 04:04
  • I notice there is a double underscore and wonder if `_gxx_personality_v0` would be better? Also I will search for libstdc++ on my pc and get back – bcperth Oct 04 '18 at 04:11
  • What it all amounts to is making sure you add `-lstdc++` to yopu link commmand as in `g++ [other files and options] -lstdc++` – bcperth Oct 04 '18 at 04:18
  • @bcperth great observation, thanks so much for hanging on with me regarding this post, removing the additional underscore from the symbol did not work unfortunately. Is my project bin suppose to have both the stdc++ dll and the stdc++-6 dll, or just one and never both? im still learning regarding IDE's and project setup. – S_BISHOP Oct 04 '18 at 04:20
  • @S_BISHOP Do you have experience with command-line or makefile compilation? An IDE is simply an abstraction of this. The fundamental ideas of flags, linkers, etc. are all present. That is, it doesn't matter where `stdc++.dll` is, so long as the path is properly linked, and the DLL contains the object that you are trying to scope. – Daniel R. Livingston Oct 04 '18 at 04:28
  • @Daniel R. Livingston thanks for the suggestion, I added the compiler flag, but it didnt solve anything, sorry i lack understanding, but why is it the code blocks mingw shipped with it, did not contain libstd++ but did contain libc++-6 ? – S_BISHOP Oct 04 '18 at 04:33
  • is it actually possible to download libc++.dll from a source and then drop it into project bin, or is that a no no ? – S_BISHOP Oct 04 '18 at 04:35
  • @DanielR.Livingston R. Livingston I do not have the command line make file experience and use the code blocks IDE at surface level. – S_BISHOP Oct 04 '18 at 04:38
  • It's probably fine to do that (minus the potential security issues). Weird that didn't work, as it appears the CodeBlocks compiler is standard `g++`. – Daniel R. Livingston Oct 04 '18 at 04:40
  • given the details I listed about the project, does anybody see any incompatibility's between the version of code blocks or mingw or SFML ? – S_BISHOP Oct 04 '18 at 04:54

1 Answers1

0

Try entering the compiler flag -lstdc++ under Settings -> Compiler -> Linker Settings (tab) -> Other Linker Options. This will link the GNU C++ Library to your project source and bring _gxx-personality-v0 into scope.

Note that this error:

The procedure entry point _gxx-personality-v0 could not be located in the dynamic link library sfml-graphics-2.dll, sfml-window-2.dll, sfml-system-2.dll, sfml-audio-2.dll

is saying that it cannot find the function definition within any of the DLLs that you've linked - i.e., your DLL linking is working fine, and this is simply a case of an unscoped function definition.

Additional references:

  1. Link error "undefined reference to `__gxx_personality_v0'" and g++

  2. How to add compiler flags on codeblocks

Daniel R. Livingston
  • 1,227
  • 14
  • 36
  • thanks for the suggestion/answer. I added the compiler flag, but it didnt solve anything, sorry i lack understanding, but why is it the code blocks mingw shipped with it, did not contain libstd++ but did contain libc++-6 ? – S_BISHOP Oct 04 '18 at 04:41
  • The numbering is probably the/related to the [version number](https://unix.stackexchange.com/questions/475/how-do-so-shared-object-numbers-work), but you should check that the function you need [is defined in the DLL](https://stackoverflow.com/questions/4438900/how-to-view-dll-functions). – Daniel R. Livingston Oct 04 '18 at 04:44
  • great to know the linking is at least successful, does each of the SFML dlls make a call to that un scoped function ? i dont quite understand the dependencies going on. – S_BISHOP Oct 04 '18 at 05:01