c++ - 未知的缺失库; -lGraf3d、-lPostscript 和 -lPhysics

标签 c++ c++11 ubuntu g++ ld

警告:新手 Ubuntu/g++ 用户

我正在尝试构建一个可在另一个平台上运行的 C++ 应用程序(C++11、OpenMP、OpenCV3、实验文件系统),但我收到了缺少库的链接器错误。这些名称太笼统,无法通过 Google 找到答案。

请问我需要安装和/或配置什么来解决这些问题?我在 Ubuntu 16.04.1

上使用 g++ 6.2
g++ -g -pthread -m64 -I/usr/include/root -O3 -fprofile-generate \
-march=native -fomit-frame-pointer -std=c++11 -std=c++1y -fopenmp \
-flto -lstdc++fs -DNDEBUG  -c -o docproc.o docproc.cpp

/usr/bin/ld: cannot find -lGraf3d
/usr/bin/ld: cannot find -lPostscript
/usr/bin/ld: cannot find -lPhysics
collect2: error: ld returned 1 exit status

这是我的 g++ 版本

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 6.2.0-3ubuntu11~16.04' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.2.0 20160901 (Ubuntu 6.2.0-3ubuntu11~16.04)

最佳答案

这似乎是solved in the past通过安装:

  • libroot-*
  • 根插件-*
  • 根系统-*

关于c++ - 未知的缺失库; -lGraf3d、-lPostscript 和 -lPhysics,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40426427/

相关文章:

c++ - "is private within this context"被抛出用于不应该是私有(private)的函数(GCC 5.3.0,C++11)

python - 检测 VGA 显示器何时插入

C++ Ubuntu。使用 FFMPEG 库编译的多个 undefined reference

c++ - 在 QTableView 中跨越两列的标题

带模板的 C++ 链表 - 如何创建 pop()?

c++ - 如何递归地将参数绑定(bind)到函数?

c++ - 将虚拟复制构造函数添加到 std::packaged_task

python - Matplotlib -- libpng 错误 : Incompatible libpng version in application and library

c++ - 将 RGB IplImage 转换为 3 个数组

c++ - 巨大的初始化列表,如何修复 "fatal error C1060: compiler is out of heap space"