简体   繁体   English

无法让Code :: Blocks在OS X Lion上运行

[英]Can't get Code::Blocks to work on OS X Lion

I just installed Code::Blocks on my Macbook Air that runs OS X Lion and I can't get it to work. 我刚刚在运行OS X Lion的Macbook Air上安装了Code :: Blocks,我无法让它工作。

At first, the problem was that I didn't have a C compiler installed, so I downloaded the developer tools, but now I'm encountering another problem: whenever I try to "Run and build" my test application, I get the following message: "Information: It seems that this project has not been built yet. Do you want to build it now?". 起初,问题是我没有安装C编译器,所以我下载了开发人员工具,但现在我遇到了另一个问题:每当我尝试“运行并构建”我的测试应用程序时,我得到以下内容消息:“信息:似乎这个项目还没有建成。你想现在建造吗?”

I can then press "Yes", "No" or "Cancel". 然后我可以按“是”,“否”或“取消”。 I obviously press "Yes", but that window keeps popping up over and over asking me the same question. 我显然是按“是”,但那个窗口不停地弹出一遍又一遍地问我同样的问题。

Also, when I try to quit Code::Blocks by using the Codeblocks menu and selecting "Quit and close all windows", it says the application has closed unexpectedly (and then I can either reopen, ignore or report). 此外,当我尝试使用Codeblocks菜单并选择“退出并关闭所有窗口”退出Code :: Blocks时,它表示应用程序已意外关闭(然后我可以重新打开,忽略或报告)。

I'm using version 10.05 of Code::Blocks. 我正在使用Code :: Blocks的10.05版本。

I just want Code::Blocks to work like it does on my Linux system. 我只是想让Code :: Blocks像我的Linux系统一样工作。

I too had a similar problem. 我也有类似的问题。 Mac OS X Lion developer tools doesn't install the command line tools to /usr/bin or any of the other typical system folders by default, which I believe Code::Blocks probably searches for programs such as make, g++, and other important tools. Mac OS X Lion开发人员工具默认情况下不会将命令行工具安装到/ usr / bin或任何其他典型系统文件夹,我相信Code :: Blocks可能会搜索make,g ++和其他重要程序工具。 If it couldn't find make, than that might explain why the project wasn't built. 如果找不到make,那可能就解释了为什么没有建立项目。

In order to properly install these, go to the preferences pane on XCode. 要正确安装这些,请转到XCode上的首选项面板。 From here select "Downloads" and then "Components." 从这里选择“下载”,然后选择“组件”。 One of these items should be Command Line Tools. 其中一项应该是命令行工具。 Just click "install and enter an apple ID." 只需点击“安装并输入苹果ID”即可。

You might have to register your apple ID as a developer. 您可能必须将Apple ID注册为开发人员。 In order to do this go to: http://developer.apple.com 为此,请访问: http//developer.apple.com

Alternatively, you could use ln to link the developer commands to the /usr/local/bin directory, but you'd have to dig around in /Developer to find them. 或者,您可以使用ln将开发人员命令链接到/ usr / local / bin目录,但是您必须在/ Developer中搜索它们。

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

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