Hi all,

I installed gcc 4.6 on my 64 bit W7 machine.
It built and compiled and ran plplot 5.9.7 examples no problem, including
the qt one

Then I tried to compile a simple qt program in Netbeans using gcc 4.6, this
program does not use Plplot. The link fails with an undefined reference to
`_Unwind_Resume'
I then tried to compile one of the supplied Qt examples from within Qt
creator, it fails with the same error

I was concerned that the multiple installs might be having some effect so I
created a new clean XP virtual machine.
I installed latest MinGW and latest Qt SDK and verified that I can build the
Qt supplied examples with the Qt supplied MinGW gcc 4.4.0.

I then installed GCC 4.6 and I do get the same error undefined reference to
`_Unwind_Resume' when I try to build a Qt example from Qt Creator. I
installed Netbeans and got the same error with the empty default Qt
application.

I installed Cmake 2.8.4 and verified that I can still build Plplot 5.9.7
with gcc 4.6 and can make and run the qt_example OK without any compile
errors.

I found this comment for the error reported by someone else on the qt
forums:
You are probably trying to build your application using a different
compiler/linker than that which was used to build Qt. Try using the MinGW
which is included with the Qt installer (if using pre-compiled binaries of
Qt), or try rebuilding Qt from source using the same toolchain which you
plan to use to compile your application. See my (probably) related bug
report in TDM's GCC/MinGW bug tracker here.

But why does it work with the PLplot Qt example? Must be different
compile/link options I guess. 

Looked at the difference between the plplot & qt link options, see attached,
but there is nothing I can make sense of - the PLplot explicitly included
many more windows standard dlls, but adding them to qt makes no difference.
One thing that may be relevant though is that Netbeans & QtCreator both
include qtmain in the link, plplot example does not.

Found another comment that latest Qt is built with g++ 4.4.0, found 4.4.4 on
the equation.com website and tried that. It builds Plplot OK, but I get the
same undefined `_Unwind_Resume' with Qt. Double checked that the MinGW
included with latest Qt sdk has g++ 4.4.0 and double checked I can build a
non plplot Qt application Ok with it, but it still will not build plplot
itself, I still get the unexpected termination of test_dyn_drv with qt.dll.

Found this thread
http://www.qtforum.org/article/29890/qt-4-6-linking-problem.html
So that explains why Qt applications will not build with gcc versions other
that 4.4.0

But what I still cannot understand is why the Plplot Qt driver will not work
with this same compiler and the Qt libraries linked with this compiler.

Conversely, why does the Plplot build work with a later compiler such as
4.4.4, and the Plplot qt_example work with it when a Netbeans or QtCreator
application does not? 

I double checked the qt_example.cpp code, it's a straightforward qt
application just like I am trying to build with NetBeans or QtCreator. I
even copied it into Netbeans and QtCreator and then stripped out all the
Plplot references leaving just an empty application and I cannot build it
with either of them with gcc 4.4.4.

So, I then downloaded the qt source and tried to build that with gcc 4.4.4,
but I got many errors. It seems everything I try just gives more problems.

Thinking some more about it, now that I have built Plplot libraries with gcc
4.4.4, would it be possible to link those with a Qt application built with
gcc 4.4.0? Tried it and it works! - I can build a fully featured Qt Plplot
program with 3D graphs, menus, panels, spinboxes etc.

Alan, I do intend to try the full MSYS build of the examples for you, but
right now my priority is to get my main application working

Regards,
Richard



-----Original Message-----
From: Arjen Markus [mailto:arjen.mar...@deltares.nl] 
Sent: 06 June 2011 14:40
To: Richard Jackson
Cc: 'Alan W. Irwin'; 'Hazen Babcock'; 'Werner Smekal'; 'PLplot development
list'
Subject: Re: [Plplot-devel] Installing Plplot with Qt under Windows

Hi Richard,

On 2011-06-06 15:37, Richard Jackson wrote:
> SUCCESS!!
> 

That _is_ good news - so it seems to be a mismatch between the
versions of Qt and GCC ...

I hope you can proclaim this for 64-bits Windows as well.

That leaves us the Fortran problem. I will try and have a look at
that this week.

Regards,

Arjen

> Whilst waiting for something else, I downloaded gcc 4.6 32 bit from
> http://www.Equation.com into my virtual XP machine and successfully built
> PLplot 5.9.7 with Qt 4.7.3. (I had to disable Fortran by renaming the gcc
> 4.6 Fortran compiler or the make just stopped after completing the Fortran
> examples)
> Then I reran the cmake with the -DBUILD_TEST=ON option and reran the
> mingw32-make and it successfully built all the c & c++ examples. After
> including the dll folder in my path I can run all the examples with the
> wingcc driver and the qt_example also runs fine.
> 
> 
> I will try the 64bit version of gcc 4.6 on my Windows 7 machine next
> 
 

DISCLAIMER: This message is intended exclusively for the addressee(s) and
may contain confidential and privileged information. If you are not the
intended recipient please notify the sender immediately and destroy this
message. Unauthorized use, disclosure or copying of this message is strictly
prohibited.
The foundation 'Stichting Deltares', which has its seat at Delft, The
Netherlands, Commercial Registration Number 41146461, is not liable in any
way whatsoever for consequences and/or damages resulting from the improper,
incomplete and untimely dispatch, receipt and/or content of this e-mail.



qt_example:

Linking CXX executable qt_example.exe
cd C:\plplot-5.9.7\build\examples\c++ && "C:\Program Files (x86)\CMake 
2.8\bin\cmake.exe" -E cmake_link_script CMakeFiles\qt_example.dir\link.txt 
--verbose=1
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E remove -f 
CMakeFiles\qt_example.dir/objects.a
C:\gcc4.4\bin\ar.exe cr CMakeFiles\qt_example.dir/objects.a 
@CMakeFiles\qt_example.dir\objects1.rsp
C:\gcc4.4\bin\g++.exe     -Wl,--whole-archive 
CMakeFiles\qt_example.dir/objects.a -Wl,--no-whole-archive  -o qt_example.exe 
-Wl,--out-implib,libqt_example.dll.a 
-Wl,--major-image-version,0,--minor-image-version,0  
C:\QtSDK\Desktop\Qt\4.7.3\mingw\lib\libQtSvg4.a 
C:\QtSDK\Desktop\Qt\4.7.3\mingw\lib\libQtGui4.a 
C:\QtSDK\Desktop\Qt\4.7.3\mingw\lib\libQtXml4.a 
C:\QtSDK\Desktop\Qt\4.7.3\mingw\lib\libQtCore4.a ..\..\dll\libplplotqtd.dll.a 
..\..\dll\libplplotd.dll.a C:\QtSDK\Desktop\Qt\4.7.3\mingw\lib\libQtSvg4.a 
C:\QtSDK\Desktop\Qt\4.7.3\mingw\lib\libQtGui4.a 
C:\QtSDK\Desktop\Qt\4.7.3\mingw\lib\libQtXml4.a 
C:\QtSDK\Desktop\Qt\4.7.3\mingw\lib\libQtCore4.a ..\..\dll\libcsirocsa.dll.a 
..\..\dll\libqsastime.dll.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 
-lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 
mingw32-make[2]: Leaving directory `C:/plplot-5.9.7/build'

Netbeans:

g++.exe -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE 
-DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX 
-DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 
-DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN 
-I'c:/QtSDK/Desktop/Qt/4.7.3/mingw/include/QtCore' 
-I'c:/QtSDK/Desktop/Qt/4.7.3/mingw/include/QtGui' 
-I'c:/QtSDK/Desktop/Qt/4.7.3/mingw/include' 
-I'/C/plplot-5.9.7/build/install/include/plplot' 
-I'/C/QtSDK/Desktop/Qt/4.7.3/mingw/include/Qt' 
-I'/C/QtSDK/Desktop/Qt/4.7.3/mingw/include/QtSvg' 
-I'c:/QtSDK/Desktop/Qt/4.7.3/mingw/include/ActiveQt' -I'.' -I'nbproject' -I'.' 
-I'c:/QtSDK/Desktop/Qt/4.7.3/mingw/mkspecs/win32-g++' -o 
build/Debug/MinGW-Windows/csvparser.o csvparser.cpp
windres -i app_resource.rc -o build/Debug/MinGW-Windows/app_resource_res.o 
--include-dir=. -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB 
-DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT 
-DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
g++ -enable-stdcall-fixup -Wl,-enable-auto-import 
-Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o 
dist/Debug/MinGW-Windows/app.exe build/Debug/MinGW-Windows/main.o 
build/Debug/MinGW-Windows/csvparser.o  -L'c:/QtSDK/Desktop/Qt/4.7.3/mingw/lib' 
-lmingw32 -lqtmaind build/Debug/MinGW-Windows/app_resource_res.o 
C:/plplot-5.9.7/build/install/lib/libcsirocsa.dll.a 
C:/plplot-5.9.7/build/install/lib/libplplotcxxd.dll.a 
C:/plplot-5.9.7/build/install/lib/libplplotd.dll.a 
C:/plplot-5.9.7/build/install/lib/libplplotqtd.dll.a 
C:/plplot-5.9.7/build/install/lib/libqsastime.dll.a -lQtGuid4 -lQtCored4 
-LC:\OpenSSL-Win32_full\lib 
c:/QtSDK/Desktop/Qt/4.7.3/mingw/lib/libqtmaind.a(qtmain_win.o): In function 
`WinMain@16':
c:/ndk_buildrepos/qt-desktop/src/winmain/qtmain_win.cpp:93: undefined reference 
to `_Unwind_Resume'
c:/ndk_buildrepos/qt-desktop/src/winmain/qtmain_win.cpp:135: undefined 
reference to `_Unwind_Resume'
c:/QtSDK/Desktop/Qt/4.7.3/mingw/lib/libqtmaind.a(qtmain_win.o):c:\\ndk_builddirectory\\Qt\\4.7\\desktop_mingw\\src\\winmain/../../include/QtCore/../../../../../../ndk_buildrepos/qt-desktop/src/corelib/tools/qvector.h:484:
 undefined reference to `_Unwind_Resume'
c:/QtSDK/Desktop/Qt/4.7.3/mingw/lib/libqtmaind.a(qtmain_win.o):c:\\ndk_builddirectory\\Qt\\4.7\\desktop_mingw\\src\\winmain/../../include/QtCore/../../../../../../ndk_buildrepos/qt-desktop/src/corelib/tools/qvector.h:485:
 undefined reference to `_Unwind_Resume'
c:/QtSDK/Desktop/Qt/4.7.3/mingw/lib/libqtmaind.a(qtmain_win.o):qtmain_win.cpp:(.eh_frame+0x12):
 undefined reference to `__gxx_personality_v0make[2]: Leaving directory 
`D:/Data/NetBeansProjects/app'
make[1]: Leaving directory `D:/Data/NetBeansProjects/app'
'
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/MinGW-Windows/app.exe] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2



------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to