简体   繁体   English

在CRF ++工具箱中处理example.cpp

[英]Dealing with the example.cpp in CRF++ toolkit

I am just starting to learn about the use of CRF++ toolkit. 我才刚刚开始学习CRF ++工具包的用法。 I downloaded the linux version of CRF++ 0.54 , When i try to compile the example.cpp under sdk/ with the command g++ -o example example.cpp there comes the problem: 我下载了CRF ++ 0.54的Linux版本,当我尝试使用命令g ++ -o example example.cpp在sdk /下编译example.cpp时,出现了问题:

hpl@hpl-desktop:~/Documents/CRF/CRF++-0.54$ g++ -oa example.cpp /tmp/ccmJQgGu.o: In function main': example.cpp:(.text+0x12): undefined reference to CRFPP::createTagger(char const*)' example.cpp:(.text+0x22): undefined reference to `CRFPP::getTaggerError()' collect2: ld returned 1 exit status hpl @ hpl-desktop:〜/ Documents / CRF / CRF ++-0.54 $ g ++ -oa example.cpp /tmp/ccmJQgGu.o:在main': example.cpp:(.text+0x12): undefined reference to函数中main': example.cpp:(.text+0x12): undefined reference to CRFPP的main': example.cpp:(.text+0x12): undefined reference to : :createTagger(char const *)'example.cpp :(。text + 0x22):对`CRFPP :: getTaggerError()'的未定义引用collect2:ld返回1退出状态

I would appreciate any suggestions on how to make the program run. 我将对如何使程序运行提出任何建议。

David 大卫

The 4th line in example.cpp says: // c++ -O3 example.cpp -lcrfpp example.cpp中的第四行显示:// c ++ -O3 example.cpp -lcrfpp

Why don't you try that? 你为什么不尝试呢?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM