简体   繁体   English

Eclipse Helios - “无法运行程序make; 不明原因“

[英]Eclipse Helios - “cannot run program make; unknown reason”

I upgraded Eclipse from Galileo to Helios, and when I try doing "Clean Project", I get an error saying "cannot run program make; unknown reason". 我将Eclipse从Galileo升级到Helios,当我尝试“清理项目”时,我收到一条错误消息“无法运行程序;未知原因”。 I was able to run make in Galileo, so I'm not sure why this is happening, and whether anyone else encountered this. 我能够在Galileo中运行make,所以我不确定为什么会发生这种情况,以及是否有其他人遇到过这种情况。

Add PATH to the environment (Preferences -> C/C++ -> Build -> Environment). 将PATH添加到环境中(首选项 - > C / C ++ - >构建 - >环境)。

I also had to add $ORACLE_HOME to the environment as well (my code uses Pro*C) - looks like CDT isn't picking-up the user's environment variables when it was before. 我还必须将$ ORACLE_HOME添加到环境中(我的代码使用Pro * C) - 看起来CDT没有在之前获取用户的环境变量。

It's annoying, I know... 这很烦人,我知道......

An alternative answer that builds on trojanfoe's above. 另一个基于trojanfoe的答案。

Assuming you can run make in your native environment shell, the solution depends on whether you selected "Replace native environment with specified one" (OP1) or "Append variables to native environment" (OP2) in (Preferences -> C/C++ -> Build -> Environment): 假设您可以在本机环境shell中运行make,解决方案取决于您是否在(首选项 - > C / C ++ - >中选择了“用指定的替换本机环境”(OP1)或“将变量附加到本机环境”(OP2)构建 - >环境):

Solution-OP1: Add PATH to the environment (Preferences -> C/C++ -> Build -> Environment). 解决方案-OP1:将PATH添加到环境中(首选项 - > C / C ++ - >构建 - >环境)。

I also had to add $ORACLE_HOME to the environment as well (my code uses Pro*C) - looks like CDT isn't picking-up the user's environment variables when it was before. 我还必须将$ ORACLE_HOME添加到环境中(我的代码使用Pro * C) - 看起来CDT没有在之前获取用户的环境变量。

It's annoying, I know... 这很烦人,我知道......

Solution-OP2: make sure the location of your make command in the PATH variable in your native environment. 解决方案-OP2:确保make命令的位置在本机环境中的PATH变量中。

我发现在项目 - >属性 - > C / C ++构建 - >环境中,必须选择“将变量附加到本机环境”而不是“用指定的替换本机环境”。

Some amplification on this helpful information for OS X that I discovered this evening with Helios: 我在今晚与Helios发现的OS X有用信息的一些放大:

my make was located in /Developer/usr/bin; 我的make位于/ Developer / usr / bin; I added this to the PATH variable. 我将其添加到PATH变量中。

In the C/C++ Build -- Settings section of the project preferences, I added the /Developer/SDKs/MacOSX10.6.skd/usr/lib directory. 在项目首选项的C / C ++ Build - Settings部分中,我添加了/Developer/SDKs/MacOSX10.6.skd/usr/lib目录。 It includes the libraries you will need. 它包括您需要的库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM