首页 > 系统服务 > 详细

configure: error: C preprocessor "arm-linux-gnueabihf-g++" fails sanity check

时间:2019-03-13 18:24:19      阅读:213      评论:0      收藏:0      [点我收藏+]

今天在交叉编译某个编解码库过程中碰到一个configure错误

运行configure的时候设置了一些配置项目

./configure CC=arm-linux-gnueabihf-gcc CPP=arm-linux-gnueabihf-g++ --host=arm-linux

  运行结果报错如下:

configure: error: C preprocessor "arm-linux-gnueabihf-g++" fails sanity check

  从我的配置意图来看g++是配置给CPP也就是C++的编译器,C的编译器配置的是gcc,从报错信息来看明显是把我的C++的编译器配置给了C,以前这样配置没碰到这种错误,于是上网搜索了一下,在stack Overflow上找到一篇有点苗头

https://stackoverflow.com/questions/15041937/configure-error-c-preprocessor-fails-sanity-check

The problem may well be that the GNU make implicit variable that denotes "your C++ compiler" is not CPP but CXX, whereas CPP is the implicit variable that denotes "your C preprocessor"; so your

 意思就是说要配置C++的编译器应该配置CXX,CPP已经默认是C的编译器选项。

所以更新后的配置如下

 

./configure CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ --host=arm-linux

  果然运行ok。

——————20190313于深圳南山科技工业园

configure: error: C preprocessor "arm-linux-gnueabihf-g++" fails sanity check

原文:https://www.cnblogs.com/tid-think/p/10524917.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!