简体   繁体   English

在Macbook pro上的OSX上编程C ++

[英]Programming C++ on OSX in Macbook pro

I'm thinking of getting a new laptop. 我正在考虑购买一台新笔记本电脑。 Is OSX C++ programmer friendly? OSX C ++程序员友好吗? I mainly use gedit, gdb, g++, meld, ddd (gdb front end), valgrind and RabbitVCS (svn) in Ubuntu. 我主要在Ubuntu中使用gedit,gdb,g ++,meld,ddd(gdb front end),valgrind和RabbitVCS(svn)。 Does OSX have equivalent softwares. OSX是否有相同的软件。

Yes, Mac OS X works well for many programmers. 是的,Mac OS X适用于许多程序员。 As for the specific software you mentioned: 至于你提到的具体软件:

  • You can get gedit for Mac OS X. 您可以获得Mac OS X的gedit
  • gdb is included with Xcode. gdb包含在Xcode中。
  • g++ is also included with Xcode. Xcode也包含了g++
  • It looks like Meld has a Fink package . 看起来Meld 有一个Fink包
  • I was able to compile and run ddd successfully. 我能够成功编译并运行ddd
  • When I tried it quite a while ago, Valgrind did not work, but I think the issues have been fixed now (see Michael Anderson's comment). 很久以前我尝试过的时候,Valgrind没有工作,但我认为现在已经解决了这些问题(参见Michael Anderson的评论)。
  • RabbitVCS will work if you install a supported file manager. 如果您安装支持的文件管理器,RabbitVCS将起作用。 As far as I know, Finder is not supported. 据我所知,Finder不受支持。

Mac OS X complies with the Single UNIX Specification and, consequently, is pretty programmer friendly. Mac OS X符合Single UNIX规范,因此对程序员非常友好。 That said, some additional niceties on Linux that go above and beyond the spec may not be available on Mac OS X. Also, some Linux applications that rely on Gnome or KDE may not be available or might not work 100% on Mac OS X. As an example, GEdit is available for Mac OS X, but is extremely buggy. 也就是说,Linux上超出规范的一些额外细节可能无法在Mac OS X上使用。此外,某些依赖Gnome或KDE的Linux应用程序可能无法使用,或者在Mac OS X上可能无法100%运行。例如,GEdit可用于Mac OS X,但是非常错误。

That said, there are also many tools and utilities for programmers that are available on Mac OS X that are not available on Linux. 也就是说,Mac OS X上提供的程序员还有许多工具和实用程序,这些工具和实用程序在Linux上不可用。 For example, on Mac OS X, I use Xcode instead of GEdit, and Xcode is arguably far superior to GEdit as a code editor. 例如,在Mac OS X上,我使用Xcode代替GEdit,而Xcode可以说远远优于GEdit作为代码编辑器。 Sadly, Mac OS X has no RabbitVCS equivalent. 可悲的是,Mac OS X没有RabbitVCS等价物。

You should have no problem with GCC, g++, etc. as those are all available through the Xcode package that is provided for free with Mac OS X. There is also a project called MacPorts , which brings many opensource packages that are available for Linux to Mac OS X. It provides an interface that is similar to apt-get (except it installs from source rather than from binaries) for installing those packages. 你应该对GCC,g ++等没有任何问题,因为这些都可以通过Mac OS X免费提供的Xcode包获得。还有一个名为MacPorts的项目,它带来了许多适用于Linux的开源软件包。 Mac OS X.它提供了一个类似于apt-get的接口(除了它从源而不是从二进制文件安装),用于安装这些包。 I have Snow Leopard and have not had any trouble with MacPorts; 我有雪豹,并没有遇到过MacPorts的麻烦; however, be aware that the MacPorts page currently lists a number of packages that do not yet work in Lion, so some things might not work with a new MacBook until the port maintainers have patched their packages to work with Lion. 但请注意,MacPorts页面目前列出了许多尚未在Lion中运行的软件包,因此在端口维护人员修补其软件包与Lion合作之前,有些东西可能无法用于新的MacBook。

GCC工具链是一样的,我们在10k线源(服务器端口)中发现Linux(Ubuntu)只有1个不同,有些包括在不同的地方。

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

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