Who uses Macs for cross-platform development?
谁使用Mac进行跨平台开发?
By cross platform I essentially mean you can compile to target Windows or Unix (not necessarily both at the same time). I understand that this also has a lot to do with writing portable code, but I am more interested in people's experience with Mac OS X to develop software.
通过跨平台,我基本上意味着你可以编译到目标Windows或Unix(不一定两者同时)。我知道这也与编写可移植代码有很大关系,但我更感兴趣的是人们使用Mac OS X开发软件的经验。
I understand that there are a range of IDEs to choose from, I would probably use Eclipse (I like the GCC toolchain) however Xcode seems to be quite popular. Could it be used as described above? At a pinch I could always virtualise with VirtualBox or VMware Player or parallels to use Visual Studio (or dual boot for that matter). Having said that I am open to any other suggested compilers (with preferably an IDE that uses GCC.)
我知道有一系列的IDE可供选择,我可能会使用Eclipse(我喜欢GCC工具链),但Xcode似乎很受欢迎。它可以如上所述使用吗?在紧要关头,我总是可以使用VirtualBox或VMware Player进行虚拟化或并行使用Visual Studio(或双重启动)。说过我对任何其他建议的编译器开放(最好是使用GCC的IDE。)
Also with the range of Macs available, which one would you recommend? I would prefer a laptop (as I already have a desktop) but am unsure of reasonable specifications.
另外还有Mac系列,您会推荐哪一款?我更喜欢一台笔记本电脑(因为我已经有一台台式机),但我不确定合理的规格。
If you are currently using a Mac to do development, I would love to hear what you develop on your Mac and what you like and don't like about it.
如果您目前正在使用Mac进行开发,我很想听听您在Mac上开发的内容以及您喜欢和不喜欢的内容。
I would primarily be developing in C/C++/Java. I am also looking to experiment with Boost and Qt, so I'm interested in hearing about any (potential) compatibility issues.
我主要是用C / C ++ / Java开发。我也希望尝试使用Boost和Qt,所以我很想听听任何(潜在的)兼容性问题。
If you have any other tips I'd love you hear what you have to say.
如果你有任何其他提示,我会爱你,你会听到你要说的话。
15 个解决方案
#1
10
Well, using a Mac is just about (discounting OSX86) the only method of actually being able to test on Mac + Windows + Linux all on the same hardware. That being said, I wouldn't go that route if that was your only reason. If you're more comfortable programming in a Windows environment, I would say to do your work in windows, and have a Mac Mini on the side, possibly even a used one you pick up for cheap just to test your software.
好吧,使用Mac只是(折扣OSX86)实际上能够在同一硬件上在Mac + Windows + Linux上进行测试的唯一方法。话虽如此,如果这是你唯一的理由,我不会走那条路。如果你更喜欢在Windows环境中编程,我会说你在Windows中做你的工作,并且有一台Mac Mini,甚至可能是你用来试用便宜的旧版本来测试你的软件。
#2
8
Eclipse runs on Mac and is well supported. For example, it's the recommended environment for developing for Android on Mac (and all other platforms).
Eclipse在Mac上运行并得到很好的支持。例如,它是在Mac(以及所有其他平台)上开发Android的推荐环境。
XCode is targetted at OS X native development, you may be able to wrangle it in to cross-compilation for Windows but you'd be very much going against the grain.
XCode的目标是OS X本机开发,你可能可以将它与Windows的交叉编译争论,但是你会非常反对。
I do a little development in XCode but mostly I'm a .NET developer, for which I use VMWare on my Mac. That may sound a bit backwards, but a Windows XP box running on VMWare on the an iMac absolutely flies (I have 4Gb of RAM) and I can create and modify virtual machines for testing (e.g.: Vista, weird Windows XP setups) very quickly. On top of all that, using a Mac day-to-day feels like bliss compared to Windows (I'd never used a Mac until about 15 months ago, I'll never go back to a permanent Windows desktop).
我在XCode中进行了一些开发,但主要是我是.NET开发人员,我在Mac上使用VMWare。这可能听起来有些倒退,但是在iMac上运行在VMWare上的Windows XP盒子绝对过得很快(我有4Gb的RAM)我可以非常快地创建和修改用于测试的虚拟机(例如:Vista,奇怪的Windows XP设置) 。最重要的是,与Windows相比,使用Mac的日常感觉就像幸福一样(直到大约15个月前我从未使用过Mac,我永远不会回到永久的Windows桌面)。
#3
5
I have switched to a mac as my main development machine a year ago and never looked back.
一年前我已经改用mac作为我的主要开发机器而且从未回头。
The one thing I like to mention is, that you write often better software if you develop on more than one platform. From time to time I've found out, that some pieces of code do work on a specific platform and fail on another. Mostly this was due some errors of me instead of software bugs.
我想提到的一件事是,如果您在多个平台上开发,您通常会编写更好的软件。我不时发现,有些代码可以在特定平台上运行而在另一个平台上运行失败。大多数情况下,这是由于我的一些错误而不是软件错误。
So in my book - cross platform development enforces more correctness.
所以在我的书中 - 跨平台开发强制执行更多正确性。
#4
5
I use an old Mac Mini at home for Windows development inside a virtual machine. I have had a really good experience with it. If I go full-screen, then it feels just like a desktop - the performance is surprisingly good.
我在家里使用旧的Mac Mini进行虚拟机内的Windows开发。我有一个非常好的经验。如果我全屏显示,那就感觉就像桌面一样 - 性能出奇的好。
You may find these posts interesting:
您可能会发现这些帖子很有趣:
Minimum hardware for effective mac development
有效的mac开发的最低硬件
Mac virtualization: VMWare Fusion or Parallels?
Mac虚拟化:VMWare Fusion还是Parallels?
在虚拟机中使用3-D
#5
5
I do all my cross-platform development on a MacBook Pro, primarily using REALbasic. For testing on Windows and Linux, I use VMware Fusion which works well with the remote debugger included with REALbasic.
我在MacBook Pro上进行所有跨平台开发,主要使用REALbasic。对于Windows和Linux上的测试,我使用VMware Fusion,它与REALbasic附带的远程调试器配合使用。
I used to have Boot Camp set up with Windows when I was doing .NET-related development. VMware and Parallels are quite fast, but are no match for natively booting the OS. I haven't had a chance to extensively try MonoDevelop in Mac OS X, but apart from lacking a GUI designer it looks like it might work well and I'll probably look into that for any future .NET projects I may do.
在我进行与.NET相关的开发时,我曾经使用Windows设置Boot Camp。 VMware和Parallels相当快,但无法与本机启动操作系统相匹敌。我没有机会在Mac OS X中广泛尝试MonoDevelop,但除了缺少GUI设计器之外,它看起来可能运行良好,我可能会考虑我可能做的任何未来的.NET项目。
I prefer to have just the one computer that can run all the OSes because it is less space on my desk, less hardware to upgrade and manage and much easier to take all OSes with me.
我更喜欢只有一台可以运行所有操作系统的计算机,因为它在我的桌面上占用的空间更少,升级和管理的硬件更少,并且更容易随身携带所有操作系统。
Any Mac these days can handle running Windows and Linux well enough. The most important thing you need is lots of RAM. Macs nowadays can handle at least 8 GB and I'd recommend that as a starting point (I have 6 GB).
如今,任何Mac都可以很好地处理运行Windows和Linux的问题。您需要的最重要的事情是大量的RAM。 Mac现在可以处理至少8 GB,我建议作为起点(我有6 GB)。
#6
4
Simply to answer the recommendation question: The new Macbook (low end model) should make an excellent development machine, if you do need a portable. And anecdotally, I used to have a Mac mini, simply because it's what I could afford, and it was excellent for most purposes. I even carried it between home and office (kept another monitor/keyboard/mouse at office, but i do even now that I have a MBP) and it was awesome. I didn't even notice it was in my backpack.
简单地回答一下推荐问题:如果您需要便携式设备,新Macbook(低端型号)应该是一款出色的开发机器。而有趣的是,我曾经拥有一台Mac mini,因为它是我能买得起的,而且它在大多数情况下都非常出色。我甚至在家里和办公室之间进行了操作(在办公室保留了另一台显示器/键盘/鼠标,但我现在甚至做了MBP)并且它非常棒。我甚至没有注意到它在我的背包里。
Edit: and there's nothing stopping you from double- or triple-booting your Mac, and doing all of your dev in Windows/*nix/OS X on the Mac.
编辑:并且没有什么能阻止你在Mac上进行双重或三重启动,以及在Mac上运行Windows / * nix / OS X中的所有开发。
#7
3
I'd certainly give Mono a look-in. It has cross-platform bindings for Qt and GTK. You also have access to MonoDevelop which is improving in leaps and bounds.
我当然会给Mono看一看。它具有Qt和GTK的跨平台绑定。您还可以访问MonoDevelop,这是一个突飞猛进的进步。
If that's of no interest to you, one thing I will mention is that VMWare and Eclipse work well together. VMWare Workstation Professional comes with an Eclipse plugin to allow remote debugging and do multiple-os deployment testing with a couple of clicks. I'd certainly recommend you get the free trial and see if that works for you.
如果您对此不感兴趣,我要提到的一点是VMWare和Eclipse可以很好地协同工作。 VMWare Workstation Professional附带一个Eclipse插件,允许远程调试,只需点击几下即可进行多操作系统部署测试。我当然建议你免费试用,看看它是否适合你。
And a Mac is a great platform to start on. Most things that aren't ported from Linux to run natively run fine on top of X11.
Mac是一个很好的平台。大多数未从Linux移植到本机运行的东西在X11之上运行良好。
#8
3
If you're looking for a single build system, a Mac is probably your best choice, as you can cross-compile to Windows and Linux using GCC.
如果您正在寻找单个构建系统,Mac可能是您的最佳选择,因为您可以使用GCC交叉编译到Windows和Linux。
- crossgcc.rts-software.org has gcc toolchains targeting Windows and Linux i386.
- A HOWTO exploring setup of MinGW through MacPorts.
crossgcc.rts-software.org有gcc工具链,主要针对Windows和Linux i386。
HOWTO通过MacPorts探索MinGW的设置。
There are compilers that target Darwin/OSX from Linux, but you won't get any of the Cocoa or Foundation libs with that approach. At least with MinGW, you have access to a big part of the Windows platform SDK.
有些编译器从Linux开始针对Darwin / OSX,但是你不会使用这种方法获得任何Cocoa或Foundation库。至少使用MinGW,您可以访问Windows平台SDK的很大一部分。
#9
2
Another option is Cocotron. It runs on Mac OS X, and includes cross-compilers that target Windows, Linux, and Solaris, an Objective-C runtime and portable Foundation framework that works with all three, and an AppKit framework for Windows.
另一种选择是Cocotron。它在Mac OS X上运行,包括针对Windows,Linux和Solaris的交叉编译器,可与所有这三者一起使用的Objective-C运行时和可移植的Foundation框架,以及适用于Windows的AppKit框架。
#10
1
Depends on what you want to develop. If it's GUI apps you might want to develop and test on the target platform. For Java related development (especially enterprise) it's great to work on a mac, especially since Apple released jdk1.6 not long ago. Eclipse and Netbeans are the IDEs I'm using on both Mac and Linux.
取决于你想要发展的东西。如果是GUI应用程序,您可能希望在目标平台上进行开发和测试。对于Java相关的开发(尤其是企业)来说,在Mac上工作非常棒,特别是因为Apple不久前发布了jdk1.6。 Eclipse和Netbeans是我在Mac和Linux上使用的IDE。
#11
1
I use my Macs for cross-platform-programming. However, my projects are fairly small and seldomly contain GUIs.
我使用我的Mac进行跨平台编程。但是,我的项目相当小,很少包含GUI。
I have set up virtual machines to do the compilation. As for IDEs my experience shows that it is often required to have "native" project files to share with other developers. Hence, I primarily develop in XCode and in the end create one project in Visual Studio and a Makefile for Linux. If possible however, I set all the projects up so that they share the source files.
我已经设置了虚拟机来进行编译。至于IDE,我的经验表明,通常需要将“本机”项目文件与其他开发人员共享。因此,我主要在XCode中开发,最后在Visual Studio中创建一个项目,在Linux中创建一个Makefile。但是,如果可能的话,我会设置所有项目,以便它们共享源文件。
Eclipse projects are fairly compatible for Linux and OSX, but not Windows.
Eclipse项目与Linux和OSX完全兼容,但不兼容Windows。
As others already proposed, I would recommend to use the IDE and OS you are most comfortable with and then port it to the other platforms.
正如其他人已经提出的那样,我建议使用您最熟悉的IDE和操作系统,然后将其移植到其他平台。
Depending on the size of your projects I would recommend an iMac or MacBook Pro for cross-platform development. Also, Virtual Machines can be quite demanding, so be sure to get enough ram.
根据项目的规模,我会推荐iMac或MacBook Pro进行跨平台开发。此外,虚拟机可能要求很高,所以一定要获得足够的内存。
#12
0
I've used Qt over the years to do cross-platform development (and just because I like it). I'd encourage you to look at it. It event model (SIGNAL/SLOT) is different but isn't bad at all once you start using it.
多年来我使用Qt进行跨平台开发(仅仅因为我喜欢它)。我鼓励你去看看。事件模型(SIGNAL / SLOT)是不同的,但一旦开始使用它就一点都不坏。
#13
0
Here you will find an interesting post about LinkedIn being developed 100% on mac...
在这里你会发现一篇有关LinkedIn正在开发100%的有趣帖子...
#14
0
I use a MacBook for cross platform development, but I do not cross compile for other targets. It just isn't worth the hassle given how cheap it is to run multiple platforms these days. You can either use a virtualization product like VMware or just have a secondary box to multi-boot for Windows and Linux. You absolutely must have a fully automated build on every platform. Joel is always right. ;)
我使用MacBook进行跨平台开发,但我没有为其他目标进行交叉编译。考虑到如今运行多个平台的成本有多便宜,这是不值得的麻烦。您既可以使用像VMware这样的虚拟化产品,也可以使用辅助盒来为Windows和Linux进行多重启动。您必须在每个平台上都拥有完全自动化的构建。乔尔总是对的。 ;)
Alienating customers with a foreign UI is a big risk, so I recommend building a common backend and platform-specific frontends. I don't have any experience with Qt, but I have used Tk for cross platform C++ applications. It would not have worked except that I had a captive corporate audience happy just to have the software on multiple platforms at low cost.
使用外部UI来疏远客户是一个很大的风险,因此我建议构建一个通用的后端和特定于平台的前端。我对Qt没有任何经验,但我已经将Tk用于跨平台C ++应用程序。它不会有效,只是我有一个专属的企业观众高兴只是以低成本在多个平台上安装软件。
#15
0
I've written a small cross-platform UML editor in C++, for my MSc thesis degree, and I've written most of the code in my Mac in Xcode:
我用C ++编写了一个小型的跨平台UML编辑器,用于我的硕士论文学位,我在Xcode中用Mac编写了大部分代码:
For managing builds in Windows and Linux I used CMake, which generated the Xcode, Visual Studio and Makefile projects in each platform.
为了管理Windows和Linux中的构建,我使用了CMake,它在每个平台中生成了Xcode,Visual Studio和Makefile项目。
I've also used two libraries in it, Juce and POCO, the former for the GUI, the latter for specific functionality. All statically linked in each platform.
我还使用了两个库,Juce和POCO,前者用于GUI,后者用于特定功能。所有平台都静态链接。
In my opinion you can write cross-platform code in many ways, this is one of them and I'm happy with it, I could do this quite quickly, and I got my degree :)
在我看来,你可以用很多方式编写跨平台代码,这是其中之一,我很高兴,我可以很快地完成这项工作,并且获得了我的学位:)
#1
10
Well, using a Mac is just about (discounting OSX86) the only method of actually being able to test on Mac + Windows + Linux all on the same hardware. That being said, I wouldn't go that route if that was your only reason. If you're more comfortable programming in a Windows environment, I would say to do your work in windows, and have a Mac Mini on the side, possibly even a used one you pick up for cheap just to test your software.
好吧,使用Mac只是(折扣OSX86)实际上能够在同一硬件上在Mac + Windows + Linux上进行测试的唯一方法。话虽如此,如果这是你唯一的理由,我不会走那条路。如果你更喜欢在Windows环境中编程,我会说你在Windows中做你的工作,并且有一台Mac Mini,甚至可能是你用来试用便宜的旧版本来测试你的软件。
#2
8
Eclipse runs on Mac and is well supported. For example, it's the recommended environment for developing for Android on Mac (and all other platforms).
Eclipse在Mac上运行并得到很好的支持。例如,它是在Mac(以及所有其他平台)上开发Android的推荐环境。
XCode is targetted at OS X native development, you may be able to wrangle it in to cross-compilation for Windows but you'd be very much going against the grain.
XCode的目标是OS X本机开发,你可能可以将它与Windows的交叉编译争论,但是你会非常反对。
I do a little development in XCode but mostly I'm a .NET developer, for which I use VMWare on my Mac. That may sound a bit backwards, but a Windows XP box running on VMWare on the an iMac absolutely flies (I have 4Gb of RAM) and I can create and modify virtual machines for testing (e.g.: Vista, weird Windows XP setups) very quickly. On top of all that, using a Mac day-to-day feels like bliss compared to Windows (I'd never used a Mac until about 15 months ago, I'll never go back to a permanent Windows desktop).
我在XCode中进行了一些开发,但主要是我是.NET开发人员,我在Mac上使用VMWare。这可能听起来有些倒退,但是在iMac上运行在VMWare上的Windows XP盒子绝对过得很快(我有4Gb的RAM)我可以非常快地创建和修改用于测试的虚拟机(例如:Vista,奇怪的Windows XP设置) 。最重要的是,与Windows相比,使用Mac的日常感觉就像幸福一样(直到大约15个月前我从未使用过Mac,我永远不会回到永久的Windows桌面)。
#3
5
I have switched to a mac as my main development machine a year ago and never looked back.
一年前我已经改用mac作为我的主要开发机器而且从未回头。
The one thing I like to mention is, that you write often better software if you develop on more than one platform. From time to time I've found out, that some pieces of code do work on a specific platform and fail on another. Mostly this was due some errors of me instead of software bugs.
我想提到的一件事是,如果您在多个平台上开发,您通常会编写更好的软件。我不时发现,有些代码可以在特定平台上运行而在另一个平台上运行失败。大多数情况下,这是由于我的一些错误而不是软件错误。
So in my book - cross platform development enforces more correctness.
所以在我的书中 - 跨平台开发强制执行更多正确性。
#4
5
I use an old Mac Mini at home for Windows development inside a virtual machine. I have had a really good experience with it. If I go full-screen, then it feels just like a desktop - the performance is surprisingly good.
我在家里使用旧的Mac Mini进行虚拟机内的Windows开发。我有一个非常好的经验。如果我全屏显示,那就感觉就像桌面一样 - 性能出奇的好。
You may find these posts interesting:
您可能会发现这些帖子很有趣:
Minimum hardware for effective mac development
有效的mac开发的最低硬件
Mac virtualization: VMWare Fusion or Parallels?
Mac虚拟化:VMWare Fusion还是Parallels?
在虚拟机中使用3-D
#5
5
I do all my cross-platform development on a MacBook Pro, primarily using REALbasic. For testing on Windows and Linux, I use VMware Fusion which works well with the remote debugger included with REALbasic.
我在MacBook Pro上进行所有跨平台开发,主要使用REALbasic。对于Windows和Linux上的测试,我使用VMware Fusion,它与REALbasic附带的远程调试器配合使用。
I used to have Boot Camp set up with Windows when I was doing .NET-related development. VMware and Parallels are quite fast, but are no match for natively booting the OS. I haven't had a chance to extensively try MonoDevelop in Mac OS X, but apart from lacking a GUI designer it looks like it might work well and I'll probably look into that for any future .NET projects I may do.
在我进行与.NET相关的开发时,我曾经使用Windows设置Boot Camp。 VMware和Parallels相当快,但无法与本机启动操作系统相匹敌。我没有机会在Mac OS X中广泛尝试MonoDevelop,但除了缺少GUI设计器之外,它看起来可能运行良好,我可能会考虑我可能做的任何未来的.NET项目。
I prefer to have just the one computer that can run all the OSes because it is less space on my desk, less hardware to upgrade and manage and much easier to take all OSes with me.
我更喜欢只有一台可以运行所有操作系统的计算机,因为它在我的桌面上占用的空间更少,升级和管理的硬件更少,并且更容易随身携带所有操作系统。
Any Mac these days can handle running Windows and Linux well enough. The most important thing you need is lots of RAM. Macs nowadays can handle at least 8 GB and I'd recommend that as a starting point (I have 6 GB).
如今,任何Mac都可以很好地处理运行Windows和Linux的问题。您需要的最重要的事情是大量的RAM。 Mac现在可以处理至少8 GB,我建议作为起点(我有6 GB)。
#6
4
Simply to answer the recommendation question: The new Macbook (low end model) should make an excellent development machine, if you do need a portable. And anecdotally, I used to have a Mac mini, simply because it's what I could afford, and it was excellent for most purposes. I even carried it between home and office (kept another monitor/keyboard/mouse at office, but i do even now that I have a MBP) and it was awesome. I didn't even notice it was in my backpack.
简单地回答一下推荐问题:如果您需要便携式设备,新Macbook(低端型号)应该是一款出色的开发机器。而有趣的是,我曾经拥有一台Mac mini,因为它是我能买得起的,而且它在大多数情况下都非常出色。我甚至在家里和办公室之间进行了操作(在办公室保留了另一台显示器/键盘/鼠标,但我现在甚至做了MBP)并且它非常棒。我甚至没有注意到它在我的背包里。
Edit: and there's nothing stopping you from double- or triple-booting your Mac, and doing all of your dev in Windows/*nix/OS X on the Mac.
编辑:并且没有什么能阻止你在Mac上进行双重或三重启动,以及在Mac上运行Windows / * nix / OS X中的所有开发。
#7
3
I'd certainly give Mono a look-in. It has cross-platform bindings for Qt and GTK. You also have access to MonoDevelop which is improving in leaps and bounds.
我当然会给Mono看一看。它具有Qt和GTK的跨平台绑定。您还可以访问MonoDevelop,这是一个突飞猛进的进步。
If that's of no interest to you, one thing I will mention is that VMWare and Eclipse work well together. VMWare Workstation Professional comes with an Eclipse plugin to allow remote debugging and do multiple-os deployment testing with a couple of clicks. I'd certainly recommend you get the free trial and see if that works for you.
如果您对此不感兴趣,我要提到的一点是VMWare和Eclipse可以很好地协同工作。 VMWare Workstation Professional附带一个Eclipse插件,允许远程调试,只需点击几下即可进行多操作系统部署测试。我当然建议你免费试用,看看它是否适合你。
And a Mac is a great platform to start on. Most things that aren't ported from Linux to run natively run fine on top of X11.
Mac是一个很好的平台。大多数未从Linux移植到本机运行的东西在X11之上运行良好。
#8
3
If you're looking for a single build system, a Mac is probably your best choice, as you can cross-compile to Windows and Linux using GCC.
如果您正在寻找单个构建系统,Mac可能是您的最佳选择,因为您可以使用GCC交叉编译到Windows和Linux。
- crossgcc.rts-software.org has gcc toolchains targeting Windows and Linux i386.
- A HOWTO exploring setup of MinGW through MacPorts.
crossgcc.rts-software.org有gcc工具链,主要针对Windows和Linux i386。
HOWTO通过MacPorts探索MinGW的设置。
There are compilers that target Darwin/OSX from Linux, but you won't get any of the Cocoa or Foundation libs with that approach. At least with MinGW, you have access to a big part of the Windows platform SDK.
有些编译器从Linux开始针对Darwin / OSX,但是你不会使用这种方法获得任何Cocoa或Foundation库。至少使用MinGW,您可以访问Windows平台SDK的很大一部分。
#9
2
Another option is Cocotron. It runs on Mac OS X, and includes cross-compilers that target Windows, Linux, and Solaris, an Objective-C runtime and portable Foundation framework that works with all three, and an AppKit framework for Windows.
另一种选择是Cocotron。它在Mac OS X上运行,包括针对Windows,Linux和Solaris的交叉编译器,可与所有这三者一起使用的Objective-C运行时和可移植的Foundation框架,以及适用于Windows的AppKit框架。
#10
1
Depends on what you want to develop. If it's GUI apps you might want to develop and test on the target platform. For Java related development (especially enterprise) it's great to work on a mac, especially since Apple released jdk1.6 not long ago. Eclipse and Netbeans are the IDEs I'm using on both Mac and Linux.
取决于你想要发展的东西。如果是GUI应用程序,您可能希望在目标平台上进行开发和测试。对于Java相关的开发(尤其是企业)来说,在Mac上工作非常棒,特别是因为Apple不久前发布了jdk1.6。 Eclipse和Netbeans是我在Mac和Linux上使用的IDE。
#11
1
I use my Macs for cross-platform-programming. However, my projects are fairly small and seldomly contain GUIs.
我使用我的Mac进行跨平台编程。但是,我的项目相当小,很少包含GUI。
I have set up virtual machines to do the compilation. As for IDEs my experience shows that it is often required to have "native" project files to share with other developers. Hence, I primarily develop in XCode and in the end create one project in Visual Studio and a Makefile for Linux. If possible however, I set all the projects up so that they share the source files.
我已经设置了虚拟机来进行编译。至于IDE,我的经验表明,通常需要将“本机”项目文件与其他开发人员共享。因此,我主要在XCode中开发,最后在Visual Studio中创建一个项目,在Linux中创建一个Makefile。但是,如果可能的话,我会设置所有项目,以便它们共享源文件。
Eclipse projects are fairly compatible for Linux and OSX, but not Windows.
Eclipse项目与Linux和OSX完全兼容,但不兼容Windows。
As others already proposed, I would recommend to use the IDE and OS you are most comfortable with and then port it to the other platforms.
正如其他人已经提出的那样,我建议使用您最熟悉的IDE和操作系统,然后将其移植到其他平台。
Depending on the size of your projects I would recommend an iMac or MacBook Pro for cross-platform development. Also, Virtual Machines can be quite demanding, so be sure to get enough ram.
根据项目的规模,我会推荐iMac或MacBook Pro进行跨平台开发。此外,虚拟机可能要求很高,所以一定要获得足够的内存。
#12
0
I've used Qt over the years to do cross-platform development (and just because I like it). I'd encourage you to look at it. It event model (SIGNAL/SLOT) is different but isn't bad at all once you start using it.
多年来我使用Qt进行跨平台开发(仅仅因为我喜欢它)。我鼓励你去看看。事件模型(SIGNAL / SLOT)是不同的,但一旦开始使用它就一点都不坏。
#13
0
Here you will find an interesting post about LinkedIn being developed 100% on mac...
在这里你会发现一篇有关LinkedIn正在开发100%的有趣帖子...
#14
0
I use a MacBook for cross platform development, but I do not cross compile for other targets. It just isn't worth the hassle given how cheap it is to run multiple platforms these days. You can either use a virtualization product like VMware or just have a secondary box to multi-boot for Windows and Linux. You absolutely must have a fully automated build on every platform. Joel is always right. ;)
我使用MacBook进行跨平台开发,但我没有为其他目标进行交叉编译。考虑到如今运行多个平台的成本有多便宜,这是不值得的麻烦。您既可以使用像VMware这样的虚拟化产品,也可以使用辅助盒来为Windows和Linux进行多重启动。您必须在每个平台上都拥有完全自动化的构建。乔尔总是对的。 ;)
Alienating customers with a foreign UI is a big risk, so I recommend building a common backend and platform-specific frontends. I don't have any experience with Qt, but I have used Tk for cross platform C++ applications. It would not have worked except that I had a captive corporate audience happy just to have the software on multiple platforms at low cost.
使用外部UI来疏远客户是一个很大的风险,因此我建议构建一个通用的后端和特定于平台的前端。我对Qt没有任何经验,但我已经将Tk用于跨平台C ++应用程序。它不会有效,只是我有一个专属的企业观众高兴只是以低成本在多个平台上安装软件。
#15
0
I've written a small cross-platform UML editor in C++, for my MSc thesis degree, and I've written most of the code in my Mac in Xcode:
我用C ++编写了一个小型的跨平台UML编辑器,用于我的硕士论文学位,我在Xcode中用Mac编写了大部分代码:
For managing builds in Windows and Linux I used CMake, which generated the Xcode, Visual Studio and Makefile projects in each platform.
为了管理Windows和Linux中的构建,我使用了CMake,它在每个平台中生成了Xcode,Visual Studio和Makefile项目。
I've also used two libraries in it, Juce and POCO, the former for the GUI, the latter for specific functionality. All statically linked in each platform.
我还使用了两个库,Juce和POCO,前者用于GUI,后者用于特定功能。所有平台都静态链接。
In my opinion you can write cross-platform code in many ways, this is one of them and I'm happy with it, I could do this quite quickly, and I got my degree :)
在我看来,你可以用很多方式编写跨平台代码,这是其中之一,我很高兴,我可以很快地完成这项工作,并且获得了我的学位:)