make编译项目的时候出错,跳过错误的办法!

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_38890593/article/details/83017284

在编译项目的时候遇到这个问题:/bin/sh: ./flex: cannot execute binary file
使用file命令查看这个文件:

flex/flex: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
发现之所以执行不了是因为这是ARM的格式,不是PC运行的格式

flex文件不可执行,这是因为这个项目是很久之前的了,编译环境有所变化,没有重新build。

但是对于这个error ,flex这个文件对于整个项目来说,只是用flex提供库来调用而已,并不需要执行flex也可以,对项目没有影响。
对于flex这种不编译也能保证项目正常运行的话,可以选择更新时间戳来跳过!
由于我的工作环境是svn来管理代码的。
下面提供参考方法:

1.rm -rf flex		//删除flex目录,因为已经编译过了,或者make clean清除,具体需要自己查看Makefile
2.  svn up -r218 flex	//从服务器重新获取原始的flex
3.  touch flex/*			//更新flex目录下所有文件,自然也包括flex这个二进制文件
4.  make flex			//再编译flex
结果可以顺利编译通过。

之所以选择更新时间戳来跳过这个error,是因为我的项目只需要用到flex提供的库而已,所以这个flex二进制文件执行不执行对项目影响不大。

展开阅读全文

gsoap 在make时候出错,why??

07-30

在linux 下装gsoap这一工具的时候,rntar -zxvf gsoap_2.7.11.tar.gzrncd gsoap-2.7rn./configurernmakernmake 的时候出错了rnsoapcpp2-soapcpp2_yacc.o: In function `yyparse':rn/home/liuyan/gsoap-2.7/gsoap/src/soapcpp2_yacc.c:1978: undefined reference to `yylex'rnsoapcpp2-soapcpp2_yacc.o: In function `add_header':rn/home/liuyan/gsoap-2.7/gsoap/src/soapcpp2_yacc.y:1814: undefined reference to `imported'rnsoapcpp2-soapcpp2_yacc.o: In function `add_fault':rn/home/liuyan/gsoap-2.7/gsoap/src/soapcpp2_yacc.y:1690: undefined reference to `imported'rnsoapcpp2-soapcpp2_yacc.o: In function `yyparse':rn/home/liuyan/gsoap-2.7/gsoap/src/soapcpp2_yacc.y:269: undefined reference to `yylineno'rnsoapcpp2-symbol2.o: In function `mktemplate':rn/home/liuyan/gsoap-2.7/gsoap/src/symbol2.c:521: undefined reference to `imported'rn/home/liuyan/gsoap-2.7/gsoap/src/symbol2.c:537: undefined reference to `imported'rnsoapcpp2-symbol2.o: In function `mksymtype':rn/home/liuyan/gsoap-2.7/gsoap/src/symbol2.c:507: undefined reference to `imported'rnsoapcpp2-symbol2.o: In function `mktype':rn/home/liuyan/gsoap-2.7/gsoap/src/symbol2.c:459: undefined reference to `imported'rn/home/liuyan/gsoap-2.7/gsoap/src/symbol2.c:479: undefined reference to `imported'rnsoapcpp2-symbol2.o: In function `enter':rn/home/liuyan/gsoap-2.7/gsoap/src/symbol2.c:239: undefined reference to `yylineno'rnsoapcpp2-error2.o: In function `semwarn':rn/home/liuyan/gsoap-2.7/gsoap/src/error2.c:106: undefined reference to `yylineno'rnsoapcpp2-error2.o: In function `yyerror':rn/home/liuyan/gsoap-2.7/gsoap/src/error2.c:72: undefined reference to `yylineno'rnsoapcpp2-error2.o: In function `typerror':rn/home/liuyan/gsoap-2.7/gsoap/src/error2.c:121: undefined reference to `yylineno'rnsoapcpp2-error2.o: In function `semerror':rn/home/liuyan/gsoap-2.7/gsoap/src/error2.c:97: undefined reference to `yylineno'rnsoapcpp2-error2.o:/home/liuyan/gsoap-2.7/gsoap/src/error2.c:88: more undefined rrnsoapcpp2-error2.o: In function `lexerror':rn/home/liuyan/gsoap-2.7/gsoap/src/error2.c:79: undefined reference to `yytext'rn/home/liuyan/gsoap-2.7/gsoap/src/error2.c:79: undefined reference to `yylineno'rnsoapcpp2-soapcpp2.o: In function `main':rn/home/liuyan/gsoap-2.7/gsoap/src/soapcpp2.c:258: undefined reference to `yyin'rn为什么,rn是不是g++ 有问题? 论坛

没有更多推荐了,返回首页