我爲靜態編譯編譯了qt 5.5,它工作正常。Qt5.5 static build在ubuntu14上找不到-IGL
然而,當我在臨文件中添加小工具「QT + =小部件」我得到的鏈接錯誤「無法找到-IGL」
從我讀這是與開放GL庫做。我曾嘗試以下:
sudo apt-get install libglu1-mesa-dev
和
sudo apt-get install libgl1-mesa-dev
但這裏沒有運氣......我想知道如果我需要這個靜態的版本?或者一個符號鏈接丟失了,但我無法弄清楚下一步:(
編輯這是實際的錯誤消息:
g++ -static -static-libgcc -static-libstdc++ -Wl,-O1 -o ../targetRel/McpSupervisor main.o cconfig.o cconfigxml.o mcpprocessbase.o rpeprocess.o supervisor.o cipcomms.o mcpsupervisor_plugin_import.o moc_mcpprocessbase.o moc_supervisor.o moc_cipcomms.o -L/usr/lib/i386-linux-gnu/mesa -L/usr/local/Qt-5.5.1/lib -lQt5Xml -lQt5Widgets -L/usr/local/Qt-5.5.1/plugins/bearer -lqconnmanbearer -lqgenericbearer -lqnmbearer -lQt5Network -L/usr/local/Qt-5.5.1/plugins/platforms -lqxcb -L/usr/local/Qt-5.5.1/plugins/xcbglintegrations -lqxcb-glx-integration -lxcb-glx -lQt5XcbQpa -lX11-xcb -lXi -lxcb-render-util -lxcb-render -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape -lxcb-keysyms -lxcb-xkb -lQt5PlatformSupport -lfontconfig -lfreetype -lQt5DBus -lXrender -lXext -lX11 -L/usr/local/Qt-5.5.1/plugins/imageformats -lqdds -lqicns -lqico -lqjp2 -lqmng -lqtga -lqtiff -lqwbmp -lqwebp -lQt5Gui -lpng -lqtharfbuzzng -lQt5Core -lz -licui18n -licuuc -licudata -lqtpcre -lm -ldl -pthread -lgthread-2.0 -lglib-2.0 -lrt -lGL -lpthread /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libX11.a(CrGlCur.o): In function
open_library': (.text+0x33): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/bin/ld: cannot find -lGL /usr/local/Qt-5.5.1/plugins/imageformats/libqjp2.a(jas_stream.o): In function
jas_stream_tmpfile': jas_stream.c:(.text+0x7a4): warning: the use oftmpnam' is dangerous, better use
mkstemp' /usr/local/Qt-5.5.1/lib/libQt5Core.a(qfilesystemengine_unix.o): In functionQFileSystemEngine::resolveGroupName(unsigned int)': qfilesystemengine_unix.cpp:(.text+0x943): warning: Using 'getgrgid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libglib-2.0.a(libglib_2_0_la-gutils.o): In function
g_get_user_database_entry': (.text+0x25a): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-linux-gnu/4.8/../../../i386-linux-gnu/libglib-2.0.a(libglib_2_0_la-gutils.o): In functiong_get_user_database_entry': (.text+0xa3): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/local/Qt-5.5.1/lib/libQt5Core.a(qfilesystemengine_unix.o): In function
QFileSystemEngine::resolveUserName(unsigned int)': qfilesystemengine_unix.cpp:(.text+0x592): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/local/Qt-5.5.1/lib/libQt5Network.a(qhostinfo_unix.o): In function `QHostInfoAgent::fromName(QString const&)': qhostinfo_unix.cpp:(.text+0x580): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking collect2: error: ld returned 1 exit status make: *** [../targetRel/McpSupervisor] Error 1 09:49:17: The process "/usr/bin/make" exited with code 2. Error while building/deploying project qtMain (kit: Qt 5.5.1 GCC 32bit Static) When executing step "Make" 09:49:17: Elapsed time: 00:08.
'LS的什麼輸出 - l/usr/lib/libGL *'? – keltar
文件libGL.so位於'/ usr/lib/x86_64-linux-gnu/libGL.so'(或'/ usr/lib/i386-linux-gnu/libGL.so' ...所有'mesa'軟件包:http://packages.ubuntu.com/source/trusty-updates/mesa ...靜態,libgl1-mesa-swx11-dev:不可用。最新的軟件包是Ubuntu 12.04。... –
@KnudLarsen這是否意味着我無法使其靜態工作? - 有沒有解決辦法? –