Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OS X Xcode/clang to build Windows executables?

Is it possible to build classic Windows executables (Windows 8 support is not required) from C source code using the latest Xcode/clang compilers on a current Mac (e.g. without using gcc or a VM to run Linux or Windows)?

like image 555
hotpaw2 Avatar asked Oct 22 '22 03:10

hotpaw2


1 Answers

After thinking why the hell would you want to do this?, I just surprised myself and found what may actually be a solution!

The Cocotron

The Cocotron is an open source project which aims to implement a cross-platform Objective-C API similar to that described by Apple Inc.'s Cocoa documentation. This includes the AppKit, Foundation, Objective-C runtime and support APIs such as CoreGraphics and CoreFoundation.

Also see this blog post: Win-win with Cocotron and Xcode 4.3 — code for Mac, build for Windows (Part 1)

Although the last entry on the Cocotron site was from 2010 - so it may or may not still be alive

like image 85
Peter M Avatar answered Oct 27 '22 00:10

Peter M