我有一个CMake项目,我编写了一个C ++库" mathematica ++"它抽象了mathematica的WSTP
调用并将C ++对象作为mathematica对象传输。为此,我在github上使用Mathematica CMake Module
。
我有另一个命令行子项目,它使用库mathematica++
作为共享库,一切正常。
我还有另一个使用QT5的GUI项目,该项目也与mathematica++
无法启动。但是,基于QT5的Hello world应用程序编译并运行正常。即使我只是删除了mathematica ++依赖项,它也开始起作用了。当QT5和mathematica都链接时,我得到以下错误
此应用程序无法启动,因为它无法找到或加载 Qt平台插件" xcb"在""。
可用的平台插件有:custom-wayland,eglfs,linuxfb, minimal,minimalegl,offscreen,wayland-egl,wayland, wayland-xcomposite-egl,wayland-xcomposite-glx,xcb。
重新安装应用程序可能会解决此问题。中止(核心 倾倒)
如果我使用QT4而不是QT5,我会收到不同的错误
QGtkStyle无法解析GTK。确保你已经安装了 适当的图书馆。
然而,基于QT4和QT5的应用程序运行良好。甚至使用mathematica库的命令行子项目也运行良好。我不知道Mathametica库是否有任何与QT的gtk / glib2依赖项冲突的gtk / glib2依赖项。但由于它不是GUI库,我不知道它为什么会有gtk / glib2依赖。我怀疑mathematica和QT正在引用两个不同版本的gtk / glib2库。
以下是使用mathematica依赖项编译时GUI应用程序的依赖项
$ ldd schedulerqt
linux-vdso.so.1 (0x00007ffcff782000)
libQt5Widgets.so.5 => /lib64/libQt5Widgets.so.5 (0x00007f9898424000)
libmathematica++.so => /home/sensiaas/projects/senschedule/build/mathematica++/libmathematica++.so (0x00007f9898170000)
libQt5Gui.so.5 => /lib64/libQt5Gui.so.5 (0x00007f9897ccd000)
libQt5Core.so.5 => /lib64/libQt5Core.so.5 (0x00007f9897843000)
libboost_filesystem.so.1.60.0 => /lib64/libboost_filesystem.so.1.60.0 (0x00007f989762b000)
libboost_system.so.1.60.0 => /lib64/libboost_system.so.1.60.0 (0x00007f9897427000)
libWSTP64i4.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Links/WSTP/DeveloperKit/Linux-x86-64/CompilerAdditions/libWSTP64i4.so (0x00007f9896fd5000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f9896c4d000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9896a2f000)
librt.so.1 => /lib64/librt.so.1 (0x00007f9896827000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f9896621000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f989641c000)
libML64i4.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions/libML64i4.so (0x00007f98961e8000)
libWolframRTL.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libWolframRTL.so (0x00007f9895ee2000)
libm.so.6 => /lib64/libm.so.6 (0x00007f9895bd9000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f98959c2000)
libc.so.6 => /lib64/libc.so.6 (0x00007f98955fa000)
libGL.so.1 => /lib64/libGL.so.1 (0x00007f9895389000)
libharfbuzz.so.0 => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libharfbuzz.so.0 (0x00007f9895122000)
libz.so.1 => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libz.so.1 (0x00007f9894f0a000)
libpng16.so.16 => /lib64/libpng16.so.16 (0x00007f9894cd7000)
libicui18n.so.57 => /lib64/libicui18n.so.57 (0x00007f989485d000)
libicuuc.so.57 => /lib64/libicuuc.so.57 (0x00007f98944b4000)
libicudata.so.57 => /lib64/libicudata.so.57 (0x00007f9892a37000)
libpcre16.so.0 => /lib64/libpcre16.so.0 (0x00007f98927ce000)
libgthread-2.0.so.0 => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libgthread-2.0.so.0 (0x00007f98925cd000)
libglib-2.0.so.0 => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libglib-2.0.so.0 (0x00007f9892270000)
libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007f98921e5000)
/lib64/ld-linux-x86-64.so.2 (0x0000558688c3a000)
libmkl_def.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libmkl_def.so (0x00007f9890517000)
libmkl_intel_ilp64.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libmkl_intel_ilp64.so (0x00007f988fbb5000)
libmkl_core.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libmkl_core.so (0x00007f988e10e000)
libmkl_intel_thread.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libmkl_intel_thread.so (0x00007f988c700000)
libiomp5.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libiomp5.so (0x00007f988c35d000)
libippcc.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libippcc.so (0x00007f988c142000)
libippcv.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libippcv.so (0x00007f988bf1f000)
libippi.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libippi.so (0x00007f988bc7c000)
libipps.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libipps.so (0x00007f988ba36000)
libippvm.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libippvm.so (0x00007f988b820000)
libippcore.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libippcore.so (0x00007f988b614000)
libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f988b3e8000)
libxcb-dri3.so.0 => /lib64/libxcb-dri3.so.0 (0x00007f988b1e5000)
libxcb-present.so.0 => /lib64/libxcb-present.so.0 (0x00007f988afe2000)
libxcb-sync.so.1 => /lib64/libxcb-sync.so.1 (0x00007f988addb000)
libxshmfence.so.1 => /lib64/libxshmfence.so.1 (0x00007f988abd8000)
libglapi.so.0 => /lib64/libglapi.so.0 (0x00007f988a9a9000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f988a780000)
libXext.so.6 => /lib64/libXext.so.6 (0x00007f988a56e000)
libXdamage.so.1 => /lib64/libXdamage.so.1 (0x00007f988a36b000)
libXfixes.so.3 => /lib64/libXfixes.so.3 (0x00007f988a165000)
libX11-xcb.so.1 => /lib64/libX11-xcb.so.1 (0x00007f9889f63000)
libX11.so.6 => /lib64/libX11.so.6 (0x00007f9889c24000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f98899fa000)
libxcb-glx.so.0 => /lib64/libxcb-glx.so.0 (0x00007f98897df000)
libxcb-dri2.so.0 => /lib64/libxcb-dri2.so.0 (0x00007f98895da000)
libXxf86vm.so.1 => /lib64/libXxf86vm.so.1 (0x00007f98893d4000)
libdrm.so.2 => /lib64/libdrm.so.2 (0x00007f98891c3000)
libfreetype.so.6 => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libfreetype.so.6 (0x00007f9888f2f000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f9888d14000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007f9888b0f000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f98888e9000)
liblz4.so.1 => /lib64/liblz4.so.1 (0x00007f98886d5000)
libgcrypt.so.20 => /lib64/libgcrypt.so.20 (0x00007f98883ef000)
libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x00007f98881d9000)
libXau.so.6 => /lib64/libXau.so.6 (0x00007f9887fd5000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f9887d62000)
以下是命令行工具的依赖关系
$ ldd scheduler
linux-vdso.so.1 (0x00007ffc6ff02000)
libboost_filesystem.so.1.60.0 => /lib64/libboost_filesystem.so.1.60.0 (0x00007f1824b96000)
libboost_system.so.1.60.0 => /lib64/libboost_system.so.1.60.0 (0x00007f1824992000)
libmathematica++.so => /home/sensiaas/projects/senschedule/build/mathematica++/libmathematica++.so (0x00007f18246de000)
libWSTP64i4.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Links/WSTP/DeveloperKit/Linux-x86-64/CompilerAdditions/libWSTP64i4.so (0x00007f182428a000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f1823f02000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1823ce4000)
librt.so.1 => /lib64/librt.so.1 (0x00007f1823adc000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f18238d8000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f18236d3000)
libML64i4.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions/libML64i4.so (0x00007f182349d000)
libWolframRTL.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libWolframRTL.so (0x00007f1823197000)
libm.so.6 => /lib64/libm.so.6 (0x00007f1822e8e000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f1822c77000)
libc.so.6 => /lib64/libc.so.6 (0x00007f18228b1000)
/lib64/ld-linux-x86-64.so.2 (0x0000561db3517000)
libmkl_def.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libmkl_def.so (0x00007f1820be3000)
libmkl_intel_ilp64.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libmkl_intel_ilp64.so (0x00007f1820281000)
libmkl_core.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libmkl_core.so (0x00007f181e7da000)
libmkl_intel_thread.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libmkl_intel_thread.so (0x00007f181cdcc000)
libiomp5.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libiomp5.so (0x00007f181ca29000)
libippcc.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libippcc.so (0x00007f181c810000)
libippcv.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libippcv.so (0x00007f181c5eb000)
libippi.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libippi.so (0x00007f181c348000)
libipps.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libipps.so (0x00007f181c102000)
libippvm.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libippvm.so (0x00007f181beec000)
libippcore.so => /usr/local/Wolfram/Mathematica/11.1/SystemFiles/Libraries/Linux-x86-64/libippcore.so (0x00007f181bce0000)