Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » GUI with Qt(Eclipse and Qt)
GUI with Qt [message #526490] Sun, 11 April 2010 14:45 Go to next message
Stefan Hansen is currently offline Stefan Hansen
Messages: 8
Registered: April 2010
Junior Member
Hi there,

The design of a read out station with GUI for a microcontroller System is planed. The focus of the work is the developement of algorithms for the microcontroler system. Never the less I need the GUI Smile

Eclipes and Qt seemed to be a suitable solution. Since some weeks I work with eclipse. Some small programms are working fine. But the combination with the Qt brings some problems.

I worke on a Windows 7 System with eclipse and the Qt SDK: Complete Development Environment with the releasedate 2010.02.01.

For the first tests I implemented the Adressbook example of the Qt Webpage:
http://qt.nokia.com/doc/qt-eclipse-1.6/eclipse-integration-g etting-started.html

(One sign of my problem is a small red cross in the main tab in the Run configuration menue.)
The Build process ends with some error messages:

make: *** [debug] Error 2
make[1]: *** [debug\Adressbook.exe] Error 1
undefined reference to '__gxx_personality_v0]
undefined reference to '_Unwind_Resume'
undefined reference to '_Unwind_Resume'
undefined reference to '_Unwind_Resume'
undefined reference to '_Unwind_Resume'

Is there a possibility to solve this problem.

Thank you for your help
Stefan Hansen
Re: GUI with Qt [message #527187 is a reply to message #526490] Wed, 14 April 2010 08:04 Go to previous messageGo to next message
Stefan Hansen is currently offline Stefan Hansen
Messages: 8
Registered: April 2010
Junior Member
I am trying to find my way through this problem. Further below the chain i am going to find out how the problem could be solved.

The Meaning of the Error Messages
make: *** [debug] Error 2
make[1]: *** [debug\Adressbook.exe] Error 1
reffers in my understanding to a problem with the build process of the programm (right?). And further on it says there is a problem with considering the debugging (right?).
Usually I dont have problems with debugging. Thus the only change I made is the integration of the Qt libs. Thus the problems with the build process are due to the Qt libs.

On which stages of the build process there could arrise this error message?

Best regards
Stefan
Re: GUI with Qt [message #527388 is a reply to message #527187] Thu, 15 April 2010 02:58 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Undefined references to internal run-time library functions, such as __gxx_personality_v0, are also a symptom of linking C++ object files with gcc instead of g++. Linking the same object file with g++ supplies all the necessary C++ libraries and will produce a working executable.



Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: GUI with Qt [message #527439 is a reply to message #527187] Thu, 15 April 2010 05:16 Go to previous messageGo to next message
John McCabe is currently offline John McCabe
Messages: 179
Registered: July 2009
Senior Member
On Wed, 14 Apr 2010 08:04:30 -0400, Stefan Hansen
<stefan.hansen@gmx.net> wrote:

>I am trying to find my way through this problem. Further below the chain i am going to find out how the problem could be solved.

How do you launch Eclipes? I presume you have Eclipse Qt Integration
installed? If so, are you using the "Start Eclipse with MinGW" item in
the Qt Integration menu?

I believe that's what solved the same problem for me.
Re: GUI with Qt [message #529778 is a reply to message #527388] Tue, 27 April 2010 04:14 Go to previous messageGo to next message
Stefan Hansen is currently offline Stefan Hansen
Messages: 8
Registered: April 2010
Junior Member

Thank you for the hints. I am still working on this problem.

Well I used the Start Eclipse with MinGW function. But it did not help to solve the problem.

Let me try to find a commonalitys. If I am right both of your contributions are reffering to the use of the wrong linkin libs.

Is there a way how I could check if the right linking libs are used? Or ist there a way to tell eclipse which should be used?

Best regards
Stefan
Re: GUI with Qt [message #529817 is a reply to message #529778] Tue, 27 April 2010 07:12 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
The message you posted indicates that you used gcc (i.e. the C compiler) to link C++ libraries. You must use the g++ (C++ compiler) for linking. Usually when you setup a C++ project Eclipse will choose the correct linker. Did you change anything in the project properies?

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: GUI with Qt [message #530500 is a reply to message #529817] Thu, 29 April 2010 16:16 Go to previous messageGo to next message
Stefan Hansen is currently offline Stefan Hansen
Messages: 8
Registered: April 2010
Junior Member
Well if it is so not on purpose. Which are the critical tabs and values?

I just started a new Project without changing anything in the project configutation. The Errormessage did not change.

Best regards
Stefan

[Updated on: Thu, 29 April 2010 16:25]

Report message to a moderator

Re: GUI with Qt [message #530549 is a reply to message #530500] Fri, 30 April 2010 02:47 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Open Project Properties->C/C++ Build->Settings and check the command for the linker. It should be g++

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: GUI with Qt [message #530808 is a reply to message #530549] Sat, 01 May 2010 04:21 Go to previous messageGo to next message
Stefan Hansen is currently offline Stefan Hansen
Messages: 8
Registered: April 2010
Junior Member
Well there seems to be a little Progress. Because at least i am able to complete the Build process. But I am not able to compile the project and create an executable. Below the output during the make process.


g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\Softwa~1\Qt\2010.02.1\qt\include\QtCore" -I"c:\Softwa~1\Qt\2010.02.1\qt\include\QtGui" -I"c:\Softwa~1\Qt\2010.02.1\qt\include" -I"c:\Softwa~1\Qt\2010.02.1\qt\include\ActiveQt" -I"release" -I"." -I"c:\Softwa~1\Qt\2010.02.1\qt\mkspecs\default" -o release\main.o main.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o release\Adress_Book.exe release/main.o release/adress_book.o release/moc_adress_book.o -L"c:\Softwa~1\Qt\2010.02.1\qt\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
c:\Softwa~1\Qt\2010.02.1\qt\lib/libqtmain.a(qtmain_win.o):qt main_win.cpp:(.text+0x1c2): undefined reference to `_Unwind_Resume'
c:\Softwa~1\Qt\2010.02.1\qt\lib/libqtmain.a(qtmain_win.o):qt main_win.cpp:(.text$_ZN7QVectorIPcE7reallocEii[QVector <char*>::realloc(int, int)]+0x187): undefined reference to `_Unwind_Resume'
c:\Softwa~1\Qt\2010.02.1\qt\lib/libqtmain.a(qtmain_win.o):qt main_win.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\Adress_Book.exe] Error 1
mingw32-make[1]: Leaving directory `C:/Users/Stefan/workspace/C-Projekte/Adress_Book'
mingw32-make: *** [release] Error 2
Re: GUI with Qt [message #530936 is a reply to message #530808] Mon, 03 May 2010 02:17 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Hmm, g++ is used for linking.
Did you use MinGW from the Qt SDK installation or did you install it yourselves? Or did you recently updgrade Qt? There might be a problem if the gcc versions differ.Qt 4.6.0 uses gcc 4.x and older releases used gcc 3.x. These two versions have a different C++ API (see http://bugreports.qt.nokia.com/browse/QTCREATORBUG-426).


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: GUI with Qt [message #531422 is a reply to message #530936] Tue, 04 May 2010 16:03 Go to previous messageGo to next message
Stefan Hansen is currently offline Stefan Hansen
Messages: 8
Registered: April 2010
Junior Member
Axel Mueller wrote on Mon, 03 May 2010 02:17
Hmm, g++ is used for linking.
Did you use MinGW from the Qt SDK installation or did you install it yourselves? Or did you recently updgrade Qt? There might be a problem if the gcc versions differ.Qt 4.6.0 uses gcc 4.x and older releases used gcc 3.x. These two versions have a different C++ API (see http://bugreports.qt.nokia.com/browse/QTCREATORBUG-426).



For my first steps with eclipse I used gcc 3.x. Then I installed Qt with MinGW. Both in one Package from Nokia. What I have suspected was that there are some path settings I did not found. So that the old Version is used. I have no Idea how I could be sure or verrify that the right gcc is used.

Best Regards
Stefan
Re: GUI with Qt [message #531435 is a reply to message #530808] Tue, 04 May 2010 17:03 Go to previous messageGo to next message
Edzard Egberts is currently offline Edzard Egberts
Messages: 57
Registered: July 2009
Member
Stefan Hansen schrieb:
> -lQtCore4 c:\Softwa~1\Qt\2010.02.1\qt\lib/libqtmain.a(qtmain_win.o):qt
> main_win.cpp:(.text+0x1c2): undefined reference to `_Unwind_Resume'
> c:\Softwa~1\Qt\2010.02.1\qt\lib/libqtmain.a(qtmain_win.o):qt

Just by the way shooting into the blue:

This kind of problem can result by library order. When a library uses
another library, the used library should follow the library, which uses
it. This is just "contra intuitive" and maybe your problem can be solved
by shuffleing the libraries. Because this is a well known problem, there
are arrows up/down inside of properties library for happy shuffeling.

Next shots are trying some voodoo: Normally I don't care about beauty
problems, but a path using backslash, backslash, slash doesn't look
really trustworth. Eclipse accepts backslashs, when the whole term is
set into quotes (") and maybe it is better to make the slashes unique.

Last trial: Which current builder do you use for toolchain? Sometimes
internal CDT linker didn't work and I had to switch to GNU builder. That
worked better for some projects, don't ask me why.
Re: GUI with Qt [message #531461 is a reply to message #531422] Wed, 05 May 2010 02:17 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Stefan Hansen wrote on Tue, 04 May 2010 16:03
Axel Mueller wrote on Mon, 03 May 2010 02:17
Hmm, g++ is used for linking.
Did you use MinGW from the Qt SDK installation or did you install it yourselves? Or did you recently updgrade Qt? There might be a problem if the gcc versions differ.Qt 4.6.0 uses gcc 4.x and older releases used gcc 3.x. These two versions have a different C++ API (see http://bugreports.qt.nokia.com/browse/QTCREATORBUG-426).



For my first steps with eclipse I used gcc 3.x. Then I installed Qt with MinGW. Both in one Package from Nokia. What I have suspected was that there are some path settings I did not found. So that the old Version is used. I have no Idea how I could be sure or verrify that the right gcc is used.

Best Regards
Stefan

Do you still have gcc 3.x installed? Could you please type in the Windows console window:
gcc --version
and then
g++ --version

Then add a Make Target in Eclipse:
- in context menu of your project select Make Target->Create
- Name: gcc
- Make Target: --version
- Build Command: gcc
- uncheck "Run all builders"
- build the target: in context menu of your project select Make Target->Build
You should see then in the Build Console the output of the command "gcc --version".
Repeat the same procedure for g++ (you can edit the make target in the make target view). Please post all the results.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: GUI with Qt [message #532326 is a reply to message #531461] Sat, 08 May 2010 02:57 Go to previous messageGo to next message
Stefan Hansen is currently offline Stefan Hansen
Messages: 8
Registered: April 2010
Junior Member
Well I think we are approaching a solution:

Here the results:

The Results of the Versioncheck:

C:\Users\Stefan>gcc --version
gcc (GCC) 4.4.0
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

C:\Users\Stefan>g++ --version
g++ (GCC) 4.4.0
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This is matching to the Version installed together with the QT-environment.

The Make Target output:

gcc --version
gcc (GCC) 3.4.5 (mingw-vista special r3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

g++ --version
g++ (GCC) 3.4.5 (mingw-vista special r3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

So eclipse uses the wrong version og g++.
I checked the path settings and they were correct (in my oppinion) so I guess I look in the wrong place. But were do i find the setting for the compiler?

Best Regards
Stefan Hansen
Re: GUI with Qt [message #532455 is a reply to message #532326] Mon, 10 May 2010 03:08 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
OK, Eclipse is using the wrong gcc version. The way Eclipse looks for the correct MinGW path is a bit complicated.
This is what I got from the CDT source:
1. Try the mingw directory in the platform install directory: e.g. C:\eclipse\mingw\bin
2. Try the directory above the install dir
3. Look in PATH values. Look for mingw32-gcc.exe
4. Try looking if the mingw installer ran (examine registry)
5. Try the default MinGW install dir (C:\mingw\bin)

I suppose you used the MinGW installer for version 3.4.5 and version 4.4.0 is in your Qt directory. In your case item no. 4 seems to be the winner. Is there no file "mingw32-gcc.exe" in your PATH?
As a workaround you can copy the MinGW folder from your Qt folder into the Eclipse installation folder (or in parallel, i..e C:\Programs\MinGW if Eclipse resides in C:\Programs\Eclipse)


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: GUI with Qt [message #532725 is a reply to message #532455] Mon, 10 May 2010 22:53 Go to previous messageGo to next message
Andrew Gvozdev is currently offline Andrew Gvozdev
Messages: 254
Registered: July 2009
Senior Member
Quote:
3. Look in PATH values. Look for mingw32-gcc.exe

Note that this was added only in CDT 7.0, https://bugs.eclipse.org/bugs/show_bug.cgi?id=195572

Andrew
Re: GUI with Qt [message #533308 is a reply to message #532455] Thu, 13 May 2010 03:23 Go to previous messageGo to next message
Stefan Hansen is currently offline Stefan Hansen
Messages: 8
Registered: April 2010
Junior Member
Well I guess that is it.

Well coping the MinGW in the project directory helped.
mingw32-make clean is necessary to remove the files linked to the wrong libaries.

Thank you for your help.

Best regards
Stefan Hansen
Re: GUI with Qt [message #541616 is a reply to message #526490] Mon, 21 June 2010 15:39 Go to previous messageGo to next message
Chad  is currently offline Chad
Messages: 1
Registered: June 2010
Junior Member
I was having the same issues with Eclipse and the Qt Eclipse Integration installation. For me the problem was that I had manual installation of MinGW prior to installing the Eclipse Integration kit.

During the install of the Eclipse Integration, I chose my manual installation of MinGW (C:\MinGW\bin), rather than the MinGW that comes packaged with Qt.

Uninstalling Eclipse Qt Integration, and re-installing, pointing to the Qt Mingw (C:\Qt\mingw\bin) solved the problem for me! Smile

I deleted MinGW from my system, but you should be able to keep MinGW. Just make sure when you install Eclipse Integration, that you point it to the MinGW bundled with Qt.
Re: GUI with Qt [message #716109 is a reply to message #526490] Tue, 16 August 2011 09:25 Go to previous message
Rajat  is currently offline Rajat
Messages: 1
Registered: August 2011
Junior Member
Dear
I am new to QT.I have integrate Eclipse with QT but i am not able to do required setting for my Freescale I.mx35 processor. Please anyone can help me in setting the toolchain for cross compiling ARM projects.
Regards
Rajat
Previous Topic:Make arguments
Next Topic:GCC doesn't find include path
Goto Forum:
  


Current Time: Thu Jul 24 02:44:34 EDT 2014

Powered by FUDForum. Page generated in 0.04790 seconds