./configure与指定版本的g ++

Ood*_*ini 20 autoconf gcc version configure

如何告诉'configure'文件使用指定版本的g ++进行编译?

谢谢.

Dan*_*son 29

在bash shell中,你可以这样做:

./configure CC=gcc-2.95
Run Code Online (Sandbox Code Playgroud)

其他炮弹会有类似的技术,但我无法帮助你了解具体细节.如果您的项目是C++,则需要定义的变量是CXX.

  • 这有效,但不鼓励.指定CC的推荐方法是在配置参数中,而不是在环境中.换句话说,你应该做"./configure CC =/path/to/desired/compiler". (13认同)