有关在OS X 10.8 Mountain Lion上启动和运行NetBeans 7.2的cppunit的逐步说明 [英] Step by step instructions for getting cppunit up and running with Netbeans 7.2 on OS X 10.8 Mountain Lion

查看:102
本文介绍了有关在OS X 10.8 Mountain Lion上启动和运行NetBeans 7.2的cppunit的逐步说明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以提供逐步说明,以使cppunit在OS X 10.8 Mountain Lion上运行吗?这包括所需的所有下载以及Netbeans的所有配置.

Can someone please provide step by step instructions for getting cppunit working on OS X 10.8 Mountain Lion? This includes any downloads needed and any configuration of Netbeans.

当前,当我添加cppunit测试时,添加测试"对话框上会显示一条警告,提示未检测到cppunit库.测试编译可能会失败".我已经从Sourceforge和svn cppunit下载了文件,并将文件复制到了/usr/local/include,但这不会使编译错误消失.

Currently, when I add a cppunit test, there is a warning on the Add Test dialog that says "cppunit library is not detected. Test compilation might fail." I've download both from Sourceforge and from svn cppunit and copied the files to /usr/local/include, but this does not make compilation errors go away.

我想念什么? Google™对于此问题没有帮助.

What am I missing? The Google™ has been of no help with this issue.

推荐答案

我终于弄清楚我在做什么错,所以我想我会回答自己的问题,避免使用

I finally figured out what I was doing wrong, so I thought I would answer my own question and avoid a Wisdom of the Ancients.

  1. 安装Xcode.
  2. 通过偏好设置"对话框安装Xcode命令行工具(
  3. 提取
  4. 运行./configure
  5. 运行make
  6. 运行sudo make install
  1. install Xcode.
  2. install Xcode Command Line Tools via the Preferences dialog (Apple's documentation showing how to do this in Xcode 4)
  3. download CPPUnit from Sourceforge
  4. extract
  5. Run ./configure
  6. run make
  7. run sudo make install

我第一次尝试这样做可能没有为./configure运行正确的命令,但是考虑到我能够制表完整,即我不应该运行说,这是一个可疑的声明./config.

It's possible that the first time I tried this I didn't run the correct command for ./configurebut that's a dubious claim given the fact that I was able to tab complete i.e. I shouldn't have been able to run say ./config.

但是我认为解决这个问题的真正关键是必须在make install上调用sudo.我收到一个权限错误,因为脚本需要管理员权限才能将库放置到需要放置的位置.我本可以发誓在某个时候尝试过,但也失败了.

But I think the real key to my problem was having to call sudo on the make install. I was getting a permission error because the script needs admin rights to put the libraries where they need to go. I could have swore I tried this at some point and it too failed.

一个月前,我有一个同事为我尝试了此方法,然后他开始工作了.我拖延了重试,但是一旦我重试,它就像一种魅力.据我所知,OS X 10.8.1和10.8.2或3之间没有错误.

I had a coworker try this for me a month or so ago and he got it to work. I procrastinated retrying, but once I did, it worked like a charm. As far as I know, there's no bug between OS X 10.8.1 and 10.8.2 or .3.

一旦按照上面列出的步骤进行操作,就可以回到Netbeans并添加一个单元测试,而对话框不会发出抱怨.此外,测试代码已编译并运行.

Once I followed the steps I have listed above, I was able to go back to Netbeans and add a unit test without the dialog complaining. Furthermore, the test code compiled and ran.

这篇关于有关在OS X 10.8 Mountain Lion上启动和运行NetBeans 7.2的cppunit的逐步说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆