使用Makefile + Eclipse + Mac + g ++ + mpic ++

时间:2015-12-29 18:50:37

标签: eclipse macos gcc makefile

我已经安装了gcc 5.3.0(g ++)并使用它编译了mpich(mpic ++)。 我已经拥有自己的Makefile,当我从命令行完成所有内容时。

我还导入了项目以eclipse PTP(Mars)并设置构建选项以生成并将build文件夹设置为我的源文件夹。添加了我的mpic ++和g ++路径到eclipse路径环境变量。

当我从eclipse构建时,它找到并执行我的make命令,它甚至可以找到我的mpic ++,但在内部使用clang而不是gcc

当我在命令行上检查mpic ++版本时,我得到了

MacBook-Pro:mpi$ mpic++ --version
g++ (GCC) 5.3.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

我在make文件中添加了相同的命令,以便我可以查看eclipse上发生的事情,我明白了

( mpic++ --version; )
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.0.0
Thread model: posix

所以我不确定我错过了什么。我如何改变我的日食以使用gcc而不是clang?

提前致谢。

0 个答案:

没有答案