PDA

View Full Version : Strange linking error at run-time



iw2nhl
7th July 2007, 20:14
Hi to everyone!
I'm writing a C++ program with Qt4 libs.
When I do a particular sequence of operations, my program exits (but does not crash) with this error in the console:

my_program: symbol lookup error: libqtxml_plugin.so: undefined symbol: _ZN15QXmlInputSourceC1EP9QIODevice

The function is inside a plugin I've written to parse XML files, the program permits to choose the XML parser at run-time.
The plugin uses the QtXml module to parse the XML file.
I've written also another plugin which uses Xerce-c (because it can validate XML with XSD files).

That piece of code works perfectly if I call it with another set of operations!

Note that I tested it also on Windows 2000 (MinGW compiler) and asked a friend to test it on a Slackware: none of the two shows the problem.
It seems related only to Debian.
May be there is an error in the new GCC compiler (or linker or c++ libs)? MinGW and Slackware are using older versions of GCC.
I tried with different versions of Qt4 (4.2.2, 4.2.3 and 4.3.0) and the error is always the same, so I think it is not related to Qt4 (but I may be wrong).
The code seems right and gdb backtrace is of no help because the program is not crashing, simply forced to quit (so no backtrace at all).
Can anyone give me an advice on what could cause this error?

I'm using the standard Debian testing packages, regularly updated.

OS:
Linux Debian testing
Compiler:
gcc (GCC) 4.1.3 20070601 (prerelease) (Debian 4.1.2-12)
CPU:
AMD AthlonXP 2200+
Kernel:
2.6.18-4-k7

nicoaimetti
12th June 2009, 18:33
Myabe the problem is related to this post: http://www.qtcentre.org/forum/f-qt-programming-2/t-symbol-lookup-error-when-using-plugins-3182.html