[Interest] Error: /opt/qt-5.5.0/lib/libQt5*: undefined reference

Thiago Macieira thiago.macieira at intel.com
Mon Mar 7 18:37:09 CET 2016


Em segunda-feira, 7 de março de 2016, às 21:23:11 PST, Nilesh Kokane escreveu:
> While building application against Qt-5.5.0 throws the following error:
> 
> $make
> /opt/qt-5.5.0/lib/libQt5Widgets.so.5: undefined reference to
> `QOpenGLExtensions::flushShared()'

You probably have /usr/lib/libQt5Gui.so.5 (or another default libdir), 
correct? It's conflicting.

> $make VERBOSE=1
> /usr/bin/c++    -std=c++0x -fno-exceptions -Wall -Wextra -Wcast-align -
> [..]
> gnu/libKF5CoreAddons.so.5.19.0 /usr/lib/i386-linux-gnu/libQt5Gui.so.5.4.1
> /usr/lib/i386-linux-gnu/libQt5Core.so.5.4.1
> -Wl,-rpath,/home/nilesh/development/kdepimlibs/kdepimlibs/build/akonadi-mime
> /src:/usr/local/lib/i386-linux-gnu:/opt/kf5/lib/i386-linux-gnu:/opt/qt-5.5.0
> /lib
> -Wl,-rpath-link,/usr/local/lib/i386-linux-gnu:/opt/kf5/lib/i386-linux-gnu:/
> opt/qt-5.5.0/lib

The order of the paths in -rpath-link is wrong. You need the one with the most 
recent libraries to show up first.

Or you should delete the Qt 5 libraries from /usr/local/lib/i386-linux-gnu

>  runtime library [libQt5Widgets.so.5] in /usr/lib/i386-linux-gnu may be
> hidden by files in:/opt/qt-5.5.0/lib
> 
> Am I missing something?

You didn't pay attention to the cmake warning. CMake got it backwards, but the 
warning was important. You need to fix it.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list