NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

I get stuck on building a Sample Qt Application

 
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users
View previous topic :: View next topic  
Author Message
tatung



Joined: 21 Feb 2010
Posts: 3

PostPosted: Sun Feb 21, 2010 2:18 pm    Post subject: I get stuck on building a Sample Qt Application Reply with quote

Hi,
I've tried to install Qt and Netbeans in window. I've followed the instruction from Netbeans.org
http://netbeans.org/kb/docs/cnd/qt-applications.html
Now I can build, debug a C++ Application (Sample Project Welcome). But when I tried to follow the instruction to build a new Qt Applicaton, I got this error message. Something like undefined reference to `_Unwind_Resume' or undefined reference to `__gxx_personality_v0'
Code:

/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `/c/Users/tatung/Documents/NetBeansProjects/HelloForm'
/c/Qt/4.6.2/bin/qmake.exe VPATH=. -o qttmp-Debug.mk nbproject/qt-Debug.pro
mv -f qttmp-Debug.mk nbproject/qt-Debug.mk
/usr/bin/make -f nbproject/qt-Debug.mk dist/Debug/MinGW-Windows/HelloForm.exe
make[2]: Entering directory `/c/Users/tatung/Documents/NetBeansProjects/HelloForm'
c:/Qt/4.6.2/bin/uic.exe HelloForm.ui -o ui_HelloForm.h
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/Qt/4.6.2/include/QtCore' -I'c:/Qt/4.6.2/include/QtGui' -I'c:/Qt/4.6.2/include' -I'c:/Qt/4.6.2/include/ActiveQt' -I'.' -I'.' -I'nbproject' -I'.' -I'c:/Qt/4.6.2/mkspecs/default' -o build/Debug/MinGW-Windows/HelloForm.o HelloForm.cpp
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/Qt/4.6.2/include/QtCore' -I'c:/Qt/4.6.2/include/QtGui' -I'c:/Qt/4.6.2/include' -I'c:/Qt/4.6.2/include/ActiveQt' -I'.' -I'.' -I'nbproject' -I'.' -I'c:/Qt/4.6.2/mkspecs/default' -o build/Debug/MinGW-Windows/main.o main.cpp
C:/Qt/4.6.2/bin/moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/Qt/4.6.2/include/QtCore' -I'c:/Qt/4.6.2/include/QtGui' -I'c:/Qt/4.6.2/include' -I'c:/Qt/4.6.2/include/ActiveQt' -I'.' -I'.' -I'nbproject' -I'.' -I'c:/Qt/4.6.2/mkspecs/default' -D__GNUC__ -DWIN32 HelloForm.h -o moc_HelloForm.cpp
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/Qt/4.6.2/include/QtCore' -I'c:/Qt/4.6.2/include/QtGui' -I'c:/Qt/4.6.2/include' -I'c:/Qt/4.6.2/include/ActiveQt' -I'.' -I'.' -I'nbproject' -I'.' -I'c:/Qt/4.6.2/mkspecs/default' -o build/Debug/MinGW-Windows/moc_HelloForm.o moc_HelloForm.cpp
windres -i HelloForm_resource.rc -o build/Debug/MinGW-Windows/HelloForm_resource_res.o --include-dir=.
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o dist/Debug/MinGW-Windows/HelloForm.exe build/Debug/MinGW-Windows/HelloForm.o build/Debug/MinGW-Windows/main.o build/Debug/MinGW-Windows/moc_HelloForm.o  -L'c:/Qt/4.6.2/lib' -lmingw32 -lqtmaind build/Debug/MinGW-Windows/HelloForm_resource_res.o -lQtGuid4 -lQtCored4
c:/Qt/4.6.2/lib/libqtmaind.a(qtmain_win.o): In function `WinMain@16':
C:\iwmake\build_mingw_opensource\src\winmain/qtmain_win.cpp:93: undefined reference to `_Unwind_Resume'
C:\iwmake\build_mingw_opensource\src\winmain/qtmain_win.cpp:135: undefined reference to `_Unwind_Resume'
c:/Qt/4.6.2/lib/libqtmaind.a(qtmain_win.o):C:\iwmake\build_mingw_opensource\src\winmain/../../include/QtCore/../../src/corelib/tools/qvector.h:482: undefined reference to `_Unwind_Resume'
c:/Qt/4.6.2/lib/libqtmaind.a(qtmain_win.o):C:\iwmake\build_mingw_opensource\src\winmain/../../include/QtCore/../../src/corelib/tools/qvector.h:483: undefined reference to `_Unwind_Resume'
c:/Qt/4.6.2/lib/libqtmaind.a(qtmain_win.o):qtmain_win.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/MinGW-Windows/HelloForm.exe] Error 1
make[2]: Leaving directory `/c/Users/tatung/Documents/NetBeansProjects/HelloForm'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/c/Users/tatung/Documents/NetBeansProjects/HelloForm'
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 3s)

I don't know what happens and how to fix it. Can anyone give me some instruction! I've played around with this error somedays and still can not fix. Sad
Back to top
Alexey Vladykin
Posted via mailing list.





PostPosted: Sun Feb 21, 2010 7:37 pm    Post subject: I get stuck on building a Sample Qt Application Reply with quote

Please read these topics for discussion of very similar problems:
http://forums.netbeans.org/topic15900.html
http://forums.netbeans.org/topic21122.html

I'd suggest either using MinGW bundled with Qt, or rebuilding Qt from
sources with your MinGW.

Alexey
Back to top
tatung



Joined: 21 Feb 2010
Posts: 3

PostPosted: Mon Feb 22, 2010 5:04 pm    Post subject: Reply with quote

Oh thank you so much Alexey Very Happy Using MinGW bundled with Qt is fine for me. Now it can be builded and run. Again, thank you so much Very Happy
Back to top
postmortem



Joined: 04 Jun 2009
Posts: 85
Location: Midwest USA

PostPosted: Mon Mar 01, 2010 2:56 am    Post subject: Reply with quote

I think last version of Qt SDK release for Windows with MinGW has switched from gcc 3.3.x to gcc 4.x, which means that you have to use their supplied MinGW.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo