![]() |
|
Entry Point Not Found |
Eric Johnson
Member #14,841
January 2013
![]() |
Hello sirs and madams. I am having a bit of an issue with C::B and Allegro 5. As it stands right now, I can write and execute games with ease, but am unable to launch the game directly from the release and/or debug .exe files that are created upon building the application. Upon building the application, a file is created under my bin/release directory, entitled "test.exe". Should I launch this file, I receive the following error message: "The procedure entry point __gx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll." In the past I have used Dev C++ as my primary IDE, and it has built Allegro 5 with ease; indeed, I would simply execute its game.exe file, and there you have it. This is not the case with C::B it seems. I am fairly new to C::B, so I am unfamiliar with its mannerisms. Any ideas? Thank you in advance.
|
relpatseht
Member #5,034
September 2004
![]() |
The IDE is only loosely related to your problem. In the future, refer to your compiler. And IDE is just a beefed up text editor. Anyway, the problem is libstdc++-6.dll is needed to run your program because your program is dynamically linked to runtime libraries. This particular runtime library has all the code for the standard set of C++ libraries (strings, vectors, etc). You can solve your problem in one of four ways:
The easiest method going forward is probably to statically link. It also means you wont have to distribute a DLL with your executable when giving it out to friends.
|
Eric Johnson
Member #14,841
January 2013
![]() |
Thank you for your response. (My compiler is MinGW.) I attempted to add the file to my system32 as well as the directory where my builds were being stored, but both returned the same error. Interestingly enough, both times also caused the error to occur whilst testing it in the IDE itself. As a result, I purged the files. Thus leaving me with options 2 and 4 of your given advice. However, I am quite new to C::B and am unfamiliar with it, so I am unaware as to how that is done. Any advice?
|
relpatseht
Member #5,034
September 2004
![]() |
I see, in that case the runtime libraries you are linking against are not the same as those used in the DLL. Anyway, statically linking should still fix your problem. If you're using the latest MinGW compiler (based on gcc 4.7) you'll need to add the flags -static-libgcc and -static-libstdc++ to your compiler options.
|
pkrcel
Member #14,001
February 2012
|
Care that latest C::B uses GCC-TDM 4.7.1 It differs from vanilla GCC in exactly that, it defaults to linking statically libstdc++...usually throws an error if you pass the compiler flag -static-listdc++ as imentioned in Allegro5 wiki tutorial. (see you other thread). which linker options are you passing to in C::B project? It is unlikely that Google shares your distaste for capitalism. - Derezo |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Missing functions means mis-matched libraries. Wrong version of binaries for your version of mingw. What does gcc -v say? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Eric Johnson
Member #14,841
January 2013
![]() |
pkrcel: Under "other linker options", I am passing the following... Edgar Reynaldo: I believe I downloaded the newest versions. I have attached an image file of what gcc -v replies with.
|
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
They have to match your compiler exactly, or you will have problems. Why not just link to the static monolith? It would be much easier than using pkg-config and every single library. :/ My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Eric Johnson
Member #14,841
January 2013
![]() |
I am a complete newbie here with linking files and whatnot.
|
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
IDK if the mingw version 4.7.0 binaries for allegro will work with tdm 4.7.1. You might have to get a different compiler version, or compile allegro yourself. There is a pre-built mingw 4.5.0 I put together here. (Which you can match with 4.5.0 allegro binaries) Edit To link against libname.a, you would use -lname My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
pkrcel
Member #14,001
February 2012
|
Sheegoth said: pkrcel: Under "other linker options", I am passing the following... A little weird, since you are on windows, and the version of GCC you have is indeed TDM-GGC 4.7.1 (64bit) which comes bundled with latest C::B (since it is the one used to BUILD C::B itself, onlyit's 32bit) Could you check the output of "pkg-config -static-libgcc -static-libstdc++" on your command line please? It is unlikely that Google shares your distaste for capitalism. - Derezo |
Eric Johnson
Member #14,841
January 2013
![]() |
Should I just type "pkg-config -static-libgcc -static-libstdc++" into my command line, or how should I go about this?
|
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Yes, type it in. Right click on the command line window for copy paste options. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Eric Johnson
Member #14,841
January 2013
![]() |
Aah, okay. Thank you kindly.
|
pkrcel
Member #14,001
February 2012
|
Yep, so the output is not passed to g++. As expected, I didn't know there was pkg-config for cmd.exe Kidding aside, could you please make sure in the Compiler Settings -> Global Compiler Settings -> Other Settings Tab you have the Compiler Logging field set to "full command line". (Default in latest C::B) Then please rebuld your project, and copy the content of the "output" window in a text file you attach here. I'll have a look at how the compiler is invoked. Thanks It is unlikely that Google shares your distaste for capitalism. - Derezo |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
pkrcel said: copy the content of the "output" window in a text file you attach here. Better yet, look in your project directory and upload the build log for your project. It's named PROJECT_NAME_build_log.html. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
pkrcel
Member #14,001
February 2012
|
Uh...doesn't it get appended for each and every build? I was afraid of a big file. It is unlikely that Google shares your distaste for capitalism. - Derezo |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
No, it overwrites the file each time. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
pkrcel
Member #14,001
February 2012
|
Which makes a lot more sense...shame on me. It is unlikely that Google shares your distaste for capitalism. - Derezo |
Eric Johnson
Member #14,841
January 2013
![]() |
Hi everyone. I have decided that, for the time being, I will no longer be using C::B, nor its environment. Thank you for assisting me in the matter.
|
coaxil
Member #14,855
January 2013
|
I already passed through building in command line, so I use my IDE and it just does everything all right. It also has neat GDB front-end, really convenient. |
|