【发布时间】:2010-11-27 19:09:43
【问题描述】:
我有 gcc 4.4.5 和最新的 boost 库。我想专门为它的正则表达式库使用 boost。我尝试使用内置的 c++ 正则表达式函数,但显然它们还没有完全发挥作用。我按照在线教程设置了netbeans。
我将 /usr/include/boost 添加到 c++ 代码辅助包含目录中。然后,我将 -lboost_regex-mt 添加到项目配置中的 build>linker>additional options 区域。但我仍然收到此错误:
/usr/bin/ld: cannot find -lboost_regex-mt
collect2: ld returned 1 exit status
这是 netbeans 创建的命令:
g++ -lboost_regex-mt -o dist/Debug/GNU-Linux-x86/examples01 build/Debug/GNU-Linux-x86/main.o
我还尝试使用 -lboost-regex 和 -lboost-regex-st 执行此操作,但出现相同的错误,仅更改了 mt。 我还尝试通过终端使用正则表达式对象运行文件,但仍然遇到相同的错误。任何人都可以帮助解决这个问题吗?或者至少为我指明正确的方向?
【问题讨论】:
标签: regex linux configuration boost netbeans