提升库的编译问题
Compilation issue with boost library
我正在尝试编译一些源代码。但是,它抛出了一些与提升库相关的错误。这是错误
undefined reference to `boost::re_detail::get_mem_block()'
main.cpp:(.text+0x40a6): undefined reference to `boost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)'
main.cpp:(.text+0x40db): undefined reference to `boost::re_detail::put_mem_block(void*)'
main.cpp:(.text+0x430a): undefined reference to `boost::re_detail::put_mem_block(void*)'
main.o: In function `_ZN7Command12createVectorIdEEvRKSsRSt6vectorIT_SaIS4_EES4_.constprop.1207':
main.cpp:(.text+0x436e): undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)'
main.cpp:(.text+0x439f): undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)'
main.cpp:(.text+0x43d0): undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<
我的系统中安装了 boost 正则表达式库,并且我使用 -L 选项提供了库的路径,并使用 -lboost_regex 选项指定了库。可能是什么问题?
它确实找到了库。但仍然抛出错误
我遇到了同样的问题,它已经解决了。因此,也许您之前已经安装了旧版本的boost,并且链接器链接了旧版本。
尝试删除所有已安装的提升库,然后重新安装提升库,您的问题将得到解决。
相关文章:
- Rextester 语言编译C++问题
- C++ 多级虚拟继承编译问题
- 编译问题:在函数"_start"中:未定义对"主"的引用 collect2:错误:ld 返回 1 个退出状态
- 使用 CImg 库的 std::min 和 std::max 的编译问题
- Qt Visual Studio 2015 加载项编译问题
- libssh 问题编译问题未定义的错误
- 在 armhf 上使用 cmake 在 qt 上的编译问题 "Syntax error: wird unexpected (expecting " ) " "
- LLVM 万花筒教程 JIT 编译问题
- PX 转换例程编译问题
- 模板类编译问题与 typedef 变量
- 在 Ubuntu 16.04 LTS 上使用 c++ 编译问题?
- 编译问题与 Ubuntu Linux
- C++编译问题错误 - C2332:<类:缺少标记名称>
- AIX C++映射编译问题
- Ubuntu 下的 Cmake 和 Intel IPP 的编译问题
- 如何解决我在 Ubuntu 19.04 下使用 GLFW 时遇到的这个编译问题?
- wxWebView在Ubuntu上的编译问题
- C++constexpr编译问题
- CMake - OpenVR 编译问题
- C++ SD 总线源文件编译问题