使用 cmake 实用程序编译时出错
error in compiling using cmake utility
我正在尝试使用以下 make 命令编译我的 gcc 代码。操作系统:红帽,gcc - 4.1
但是我收到如下错误:rmtrain@lintrni130 $/usr/local/bin/make all
[ 21%] Built target GCVCore
Linking CXX executable CFE
/usr/bin/ld: warning: libicui18n.so.36, needed by ../../Generic/icu/lib/libicuio.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libxalanMsg.so.110, needed by ../../Generic/Xalan/lib/libxalan-c.so, not found (try using -rpath or -rpath-link)
CMakeFiles/CFE.dir/trnuser1/rmtrain/DevelopmentEnv/Generic/ConvUI/GCVConvUISetting.o: In function `xercesc_2_6::XMLAttDefList::~XMLAttDefList()':
GCVConvUISetting.cpp:(.text._ZN11xercesc_2_613XMLAttDefListD0Ev[xercesc_2_6::XMLAttDefList::~XMLAttDefList()]+0x2f): undefined reference to `xercesc_2_6::XMemory::operator delete(void*)'
请帮忙。
警告表示您链接到的某些库依赖于其他共享库,并且在链接器的搜索路径中找不到这些库。 链接器手册描述了它如何在文档中形成-rpath-link
选项的搜索路径
它们只是警告,因此不会导致您的链接失败。如果在运行时找不到这些必需的库,这将是一个问题,但在链接时不一定是问题。
如果要使警告静音,则需要找出哪个目录包含libicui18n.so.36
和libxalanMsg.so.110
,并使用手册中描述的方法之一告诉链接器查找该目录。
最后一行是真正的问题,表示您没有链接到定义该符号的库。您需要找出它是哪个库并使用-lfoo
链接到它,它可能会像-lxerces
>我重新安装了ICU 3.2而不是 3.6.It 然后工作正常。
相关文章:
- 在Linux for Windows上编译C++代码时出错
- 为x86而非x64编译时出错
- 当我尝试通过 mingw 使用 CMake 和 SFML 库编译项目时出错
- 尝试在Windows上执行C++时出错(通过MinGW编译)
- 如何使用我构建的库,而不会从源代码出错,但不为我自己的项目编译?
- constexpr 使用 clang 编译 TensorFlow 时出错
- 从DLL导出函数,LoadLibrary()需要用TEXT转换的字符串才能编译而不会出错
- 编译包含指向模板函数的指针的初始值设定项列表时,gcc 出错,但 clang 不出错
- 编译时出错 - 从 DWORD 到 LPCVOID 的转换
- 在发布模式下启动使用库的静态链接编译的应用程序时出错
- 编译时出错 - 链接.cpp和头文件
- <limits> 使用 VSC2019 编译旧代码时出错
- 在 ubuntu 焦点上编译虚幻引擎 4.25 时出错
- 编译包含LLVM API标头的C++文件时出错
- 编译以下代码时出错
- 使用交叉工具ng编译gcc时出错
- 在 dll 中为 qLibrary 编译 qobject 时出错
- 使用 cmake 在窗口上编译 c++ 数据库时出错
- 使用 TDM GCC 5.1.0 编译 PDCurses36 时出错
- Lua :在原生lua中编译,但在使用LuaJIT和sol2时C++出错