将C ++代码从Windows移植到Mac [英] Porting C++ code from Windows to the Mac

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

问题描述

我是一个很长时间的Windows开发人员,它看起来像我将参与移植Windows应用程序到Mac。

I'm a long time Windows developer, and it looks like I'm going to be involved in porting a Windows app to the Mac.

我的Windows应用程序有一个C ++ DLL控制网络适配器(有线和无线) 。这是使用标准库和Boost编写的,因此大多数应该在跨平台上工作。

My Windows application has a C++ DLL that controls network adapters (wired and wireless). This is written using the standard library and Boost, so most of it should work cross platform.

在Mac上,大多数人使用IDE /写C ++?此外,有人可以提供指向Mac的任何API,可以控制WiFi适配器(关联,扫描,断开连接等)?

On the Mac, what IDE/complier do most folks use if they want to write C++? Also, can someone provide a pointer to whatever APIs the Mac has that can control WiFi adapters (associate, scan, disconnect, etc)?

推荐答案

Xcode是Mac OS X的IDE,您可以通过免费在线会员加入Apple开发人员连接下载最新版本。

Xcode is the IDE for Mac OS X, you can download the latest version by joining the Apple Developer Connection with a free Online membership.

我不相信有任何支持的API用于控制无线网络适配器。最接近的是系统配置框架,但我不知道它是否会让你做你想要的一切。

I don't believe there are any supported APIs for controlling wireless networking adaptors. The closest thing would be the System Configuration framework, but I don't know if it will let you do everything you want.

此外,我强烈建议反对,试图使用Flex / Air作为应用程序的用户体验。在Windows上作为Windows开发人员可能看起来很滑,但是当提供完整的Macintosh用户体验时,这些技术并不总是一个不错的选择。

Also, I would strongly recommend against trying to use Flex/Air for your application's user experience. It may look slick to you on Windows as a Windows developer, but when it comes to providing a full Macintosh user experience such technologies aren't always a great choice.

一个例子,我认为Air应用程序不支持全系列的Mac OS X文本编辑键击。虽然不是所有的Mac用户都将使用所有的击键,对于那些习惯于他们试图输入一个文本字段,不处理(说)控制-A和控制E去开始和结束字段的人就像游泳通过糖浆。

For one example, I think Air applications don't support the full range of Mac OS X text editing keystrokes. While not all Mac users will use all keystrokes, for those people used to them trying to type in a text field that doesn't handle (say) control-A and control-E to go to the beginning and end of field is like swimming through syrup.

对于需要跨平台的新应用程序,我强烈建议在C ++中构建核心逻辑,同时在Mac和WPF上使用Cocoa Windows在每个平台上获得最佳的用户体验。 Mac OS X和Windows都有现代的本地用户体验技术,他们各自的用户都习惯了,也有很好的方式让C ++代码与这些技术进行互操作。

For a new application that needs to be cross-platform, I'd strongly consider building the core logic in C++ while using Cocoa on the Mac and WPF on Windows to get the best user experience on each platform. Both Mac OS X and Windows have modern native user experience technologies that their respective users are getting used to, and also have good ways for C++ code to interoperate with these technologies.

这篇关于将C ++代码从Windows移植到Mac的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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