开发者
资源
编译glimmer302报错:undeclared identifier 'strlen'
编译glimmer302报错:undeclared identifier 'strlen'
发表于2023/07/05
1781

【问题现象】

root@localhost src]# make VERBOSE=1

* Make Target is  all

#####    Making Directory  /path/to/glimmer3.02/src/Common   all  #####

make[1]: Entering directory '/path/to/glimmer3.02/src/Common'

@@@@@@@@@@@@@@@@@@@  delcher.cc @@@@@@@@@@@@@@@@@@@@@

In file included from <built-in>:405:

<command line>:1:9: warning: '__cplusplus' macro redefined [-Wmacro-redefined]

#define __cplusplus 1

        ^

<built-in>:400:9: note: previous definition is here

#define __cplusplus 201402L

        ^

delcher.cc:284:8: error: use of undeclared identifier 'strlen'

   n = strlen (s);

       ^

delcher.cc:404:10: error: use of undeclared identifier 'strlen'

   len = strlen (s);

         ^

1 warning and 2 errors generated.

make[1]: *** [/path/to/glimmer3.02/src/c_make.gen:328: delcher.o] Error 1

make[1]: Leaving directory '/path/to/glimmer3.02/src/Common'

#####    Making Directory /path/to/glimmer3.02/src/ICM   all  #####

make[1]: Entering directory '/path/to/glimmer3.02/src/ICM'

@@@@@@@@@@@@@@@@@@@  icm.cc @@@@@@@@@@@@@@@@@@@@@

【解决办法】

delcher.hh中头文件包含将#include  <string>修改成#include  <string.h>

【END】

如有疑问,欢迎评论区留言讨论~

收藏举报
Level 1
0
帖子
0
粉丝
0
获赞