Debugging or running in codelite => __gxx_personality_v0

CodeLite installation/troubleshooting forum
User avatar
Marcel
CodeLite Enthusiast
Posts: 17
Joined: Tue May 14, 2013 1:05 am
Genuine User: Yes
IDE Question: c++
Contact:

Debugging or running in codelite => __gxx_personality_v0

Post by Marcel »

Hi again (hope it's the last problem I encounter hehe),

I am trying to run a program that uses SFML(Multimedia library): http://www.sfml-dev.org/tutorials/2.0/start-cb.php

Maybe this part is interesting:
There are multiple variants of gcc for Windows, which are incompatible with each other (different exception management, threading model, etc.). Make sure that you pick up the right package according to the version that you use. If you don't know, check which of the libgcc_s_sjlj-1.dll or libgcc_s_dw2-1.dll file you have in your MinGW/bin folder. If you're using the version of MinGW shipped with Code::Blocks, you probably have a SJLJ version.
If you feel like your version of gcc can't work with the precompiled SFML libraries, don't hesitate to recompile SFML, it's not complicated.
I am able to compile the program and I can start it via double click inside the debug folder.

But running it via codelite gives me this error:
Image
(Couldn't find entry point __gxx_personality_v0 in sfml-graphics-d-2.dll)

Running the debugger fails with:
Image

I am using the official MinGW build (DW2).
The SFML libraries i am linking are DW2 libraries too.

Is it possible, that I am not able to run this inside codelite because it's no sjlj?! Like I said, running outside of codelite works just fine.

Codelite V.: 5.1
MinGW 4.7.2 (not TDM)
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugging or running in codelite => __gxx_personality_v0

Post by eranif »

Usually _gxx_personality_v0 means something is wrong with your libstd++
So your guess is probably correct

- You could try running Dependency Walker and see which DLLs are loaded
- You could link to SFML statically instead of using the DLLs as suggested in the tutorial you linked

And yes, MinGW is very strict about versioning, usually you will need to use all the DLLs compiled with the same version of GCC that you use for compiling your application
Eran
Make sure you have read the HOW TO POST thread
User avatar
Marcel
CodeLite Enthusiast
Posts: 17
Joined: Tue May 14, 2013 1:05 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Debugging or running in codelite => __gxx_personality_v0

Post by Marcel »

Hi Eran,

As I said, I can run the program without problems outside codelite. But running it via codelite shows me the errors.
So linking and compiling should be correct. Does codelite use some kind of execution sandbox?!

I will try linking the libs statically and try Dependency Walker.

I compiled the whole SFML source with my local MinGW. The same project settings work just fine in Code::Blocks.

EDIT:
Ok Dynamic Libraries with SJLJ work with codelite...at least via "Run active project". GDB keeps crashing without an error message.
Using MinGW TDM + SJLJ libraries from the SFML site. Couldn't compile the libs myself, because libgmp-10 was missing in MinGW TDM release...why ever.
Guess I will it again tomorrow, if it's not working I will have to switch the IDE again :(

EDIT 2:
Ok statically linked libraries (SJLJ) work just fine...even while debugging :D
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugging or running in codelite => __gxx_personality_v0

Post by eranif »

codelite does not use any sandbox.
Just make sure that the correct MinGW DLLs are loaded.
This can be changed by altering the PATH environment variable from within codelite:

Settings -> Environment variables

and update your PATH to something like:

Code: Select all

PATH=\Path\To\My\MinGW\bin;$PATH
Eran
Make sure you have read the HOW TO POST thread
User avatar
Marcel
CodeLite Enthusiast
Posts: 17
Joined: Tue May 14, 2013 1:05 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Debugging or running in codelite => __gxx_personality_v0

Post by Marcel »

Hi Eran,

I just reinstalled all the stuff. I have MinGW NOT set in PATH but still can compile (I used codelite+MinGW+wxWidget INstaller this time).
How does codelite know where my MinGW installation is (It's now on the other partition)?

Guess this was the problem then, because codelite used the wrong MinGW. okedoke :roll:
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugging or running in codelite => __gxx_personality_v0

Post by eranif »

codelite uses this file which is created by codelite setup:

Path\To\CodeLite\Install'\Directory\registry.ini

there is a directive there named 'mingw' - change it to use the correct MinGW

Eran
Make sure you have read the HOW TO POST thread
User avatar
Marcel
CodeLite Enthusiast
Posts: 17
Joined: Tue May 14, 2013 1:05 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Debugging or running in codelite => __gxx_personality_v0

Post by Marcel »

Wow ok...didn't know about that. I thought codelite uses the compiler/linker set in PATH.

I now have a perfect environment. Thanks for your patience and Help :)
(Ok nearly perfect, I can't buildthe LiteEditor from the git repo hehe)

I hope asking here is ok?!

I get the following Error:

Code: Select all

g++ -include ../PCH/precompiled_header_release.h  -c  "D:/dev/src/codelitegit/Plugin/clean_request.cpp" -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -ID:\dev\tools\wxWidgets-2.9.4\lib\gcc_dll\mswu -ID:\dev\tools\wxWidgets-2.9.4\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport   -Winvalid-pch -O2 -D__WX__ -DWXUSINGDLL -DWXUSINGDLL_CL -DWXMAKINGDLL_SDK -DWXUSINGDLL_SCI -DWXUSINGDLL_WXSQLITE3  -o ./WinReleaseUnicode/clean_request.o -I. -I. -I./include -I../CodeLite -I../sdk/wxsqlite3/include -I../Interfaces -I../PCH
In file included from ./cl_aui_tb_are.h:7:0,
from ../Interfaces/plugin.h:39,
from D:/dev/src/codelitegit/Plugin/editor_config.h:36,
from D:/dev/src/codelitegit/Plugin/build_config.cpp:30:
./drawingutils.h:66:35: error: 'wxGCDC' has not been declared
In file included from ./cl_aui_tb_are.h:7:0,
from ../Interfaces/plugin.h:39,
from D:/dev/src/codelitegit/Plugin/clean_request.cpp:40:
./drawingutils.h:66:35: error: 'wxGCDC' has not been declared
In file included from D:/dev/src/codelitegit/Plugin/debuggermanager.h:33:0,
from D:/dev/src/codelitegit/Plugin/build_config.cpp:32:
../Interfaces/debugger.h: In member function 'virtual void BreakpointInfo::DeSerialize(Archive&)':
(./drawingutils.h:66:35: error: 'wxGCDC' has not been declared)

Any Idea what I am missing?
CodeLite Version: 5.1
MinGW 4.7.1 with DW2
Following these instructions:
http://codelite.org/Developers/Windows

Here's the complete Build Log:
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugging or running in codelite => __gxx_personality_v0

Post by eranif »

You need a wxWidgets build with wxUSE_GRAPHICS enabled

See this ( I have updated that wiki page to include the most up-to-date instructions ):

http://codelite.org/Developers/Windows#toc2

Eran
Make sure you have read the HOW TO POST thread
User avatar
Marcel
CodeLite Enthusiast
Posts: 17
Joined: Tue May 14, 2013 1:05 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Debugging or running in codelite => __gxx_personality_v0

Post by Marcel »

Hi Eran,

Ok after some small problems I managed to compile wxWidgets.

Code: Select all

0 errors, 102 warnings, total time: 00:07:00 seconds
Then I compiled the LiteEditor.

I had to change the target patth in the update.bat (I installed codelite in d:\dev\tools\codelite) and then it worked.

Is there a way do verify the build?! I see no real changes. This is what my IDE now looks like:
http://i.imgur.com/ZGwtJWD.jpg

It differs a lot from this:
http://forums.codelite.org/download/file.php?id=654

And the text color in the debug window is still black and flickers when stepping forward in the debugger (white for 1 second).
Can you tell me how to get this look and feel?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Debugging or running in codelite => __gxx_personality_v0

Post by eranif »

It did not work - the version in your screenshot says "codelite 5.1" it should be "5.2"
Make sure that you deployed the new binaries to the proper location and that you are running them (you need to _close_ codelite before running update.bat, or you will get permission denied)

Eran
Make sure you have read the HOW TO POST thread
Post Reply