从Windows编译C ++ for OSX [英] Compiling C++ for OSX from Windows

查看:66
本文介绍了从Windows编译C ++ for OSX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小型控制台,它是我在Windows的Visual Studio中开发的,符合标准的C ++程序.由于它是标准C ++语言,所以我要做的就是为OSX编译它吗?还是我过于乐观?

I have a small console based, standards compliant, C++ program that I developed in Visual Studio on Windows. Since it is in standard C++, is all I need to do is compile it for OSX? or am I being overly optimistic?

我正在寻找最简单,最直接的方法.是否可以从Visual Studio 2012 Professional中执行操作?如有必要,我可以使用Mac.但是,由于我的开发平台是Windows,因此如果可以从此处进行安装,那就太好了.

I am looking for the easiest and most straightforward way to do this. Is it possible to do from Visual Studio 2012 Professional? If necessary I have access to a Mac. However, since my dev platform is Windows, it would be nice if I could do it from here.

我对Mac开发完全没有经验.当您为OSX编译应用程序时,会得到什么而不是.exe?

I'm not experienced with mac development at all. When you compile an application for OSX, what do you get instead of a .exe?

推荐答案

我将获得一个OSX系统(VM很好),安装XCode,然后使用该代码编译您的代码.如果您的C ++代码是以跨平台的方式编写的,则应该微不足道.

I would get an OSX system (a VM is fine), install XCode and then compile your code using that. Should be trivial if your C++ code is written in a cross platform way.

这篇关于从Windows编译C ++ for OSX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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