处理CRF++工具包中的example.cpp

问题描述 投票:0回答:1

我刚刚开始学习CRF++工具包的使用。 我下载了linux版本的CRF++ 0.54, 当我尝试使用命令编译 sdk/ 下的 example.cpp 时 g++ -o 示例 example.cpp 问题来了:

hpl@hpl-desktop:~/Documents/CRF/CRF++-0.54$ g++ -o 一个 example.cpp /tmp/ccmJQgGu.o:在函数

main': example.cpp:(.text+0x12): undefined reference to 
CRFPP::createTagger(char const*)' 中 example.cpp:(.text+0x22): 对“CRFPP::getTaggerError()”的未定义引用 Collect2:ld返回1退出状态

如果有任何关于如何使程序运行的建议,我将不胜感激。

c++ nlp crf++
1个回答
1
投票

example.cpp 中的第 4 行表示: // c++ -O3 example.cpp -lcrfpp

你为什么不尝试一下呢?

© www.soinside.com 2019 - 2024. All rights reserved.