欢迎访问我的个人博客:zengzeyu.com
问题描述
编译 FlexCRFs 库中出现问题:
error: ‘strcmp’ was not declared in this scope
另外其他类似问题:
error: ‘strcpy’ was not declared in this scope
error: ‘strlen’ was not declared in this scope
解决方法
在发生错误的该源码文件中加入头文件 #include <string.h>
。
例如:
feasel/Chunking/chunkingfeasel.cpp:188:37: error: ‘strlen’ was not declared in this scope
for (int i = 0; i < strlen(buff); i++) {
^
那么在 chunkingfeasel.cpp
头文件中加入 #include <string.h>
即可。
以上。