You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert

4
6
5
-
No Mac needed to build — just to run.
7
+
Build native macOS applications — including Cocoa and Qt-based GUI apps — **entirely on Windows**, using Clang, CMake, and Ninja.
6
8
7
-
---
9
+
✅ **No Mac required to build.** Just transfer and run the output on a real Mac.
8
10
9
-
## What This Is
11
+
---
10
12
11
-
This project is a Windows-based toolchain setup that lets you **build native macOS applications** — including **Cocoa- and Qt-based GUI apps** — using Clang and the macOS SDK.
13
+
## ✨ Features
12
14
13
-
- Compile Objective-C, C, and Qt source files on Windows
14
-
- Use CMake + Ninja (recommended) or optional standalone scripts
15
-
- Build Mach-O binaries that run on real macOS
16
-
- Includes working Cocoa and Qt GUI examples
15
+
- Build real macOS `.app` and CLI binaries from Windows
16
+
- Full support for C, Objective-C, and Qt (QtWidgets)
17
+
- Cocoa GUI support (AppDelegate, XIB-style)
18
+
- Works with CMake + Ninja or Visual Studio
19
+
-**Automatically detects macOS SDK from `SDK/` folder**
20
+
- Includes working examples: CLI, Cocoa, and Qt GUI
21
+
- No VM or Hackintosh required
17
22
18
23
---
19
24
20
-
## Requirements
25
+
## 📦 Overview
21
26
22
-
> **Note:**This setup is intended for **static Qt builds**. If you're using dynamic Qt builds, you will need to manually handle Qt plugins, frameworks, and runtime paths (`@rpath`).
27
+
This project provides a cross-compilation toolchain that allows you to build native **macOS** executables — including GUI apps — from a **Windows** system. It supports:
23
28
24
-
To get started, you'll need:
25
-
26
-
-[LLVM/Clang for Windows](https://releases.llvm.org/)
These scripts are provided for reference or alternative workflows. You must ensure the environment variables are properly set before running them.
100
+
If you're using Qt (especially static builds), set the following environment variables before building:
82
101
83
102
```cmd
84
-
build-Objc.bat :: for Cocoa apps
85
-
build-Qt.bat :: for Qt apps
103
+
set QT_DIR=F:\Qt\6.7.3\macos
104
+
set QT_FRAMEWORKS=%QT_DIR%\lib
86
105
```
87
106
107
+
> ✅ MACOSX_SDK_PATH and MACOSX_DEPLOYMENT_TARGET are automatically handled by the toolchain (SDK is detected from the SDK/ folder, deployment target is set to 11.0 by default).
108
+
88
109
---
89
110
90
-
## Verifying the Output
111
+
## ✅ Verifying the Output
91
112
92
-
Transfer the output files to a Mac and run:
113
+
Transfer the built binaries to a Mac and run:
93
114
94
-
```sh
95
-
hello # From C-Example
96
-
ObjCExample # From Cocoa app
97
-
QtExample # From Qt app
115
+
```bash
116
+
./hello# From C-Example
117
+
./ObjCExample# From Cocoa app
118
+
./QtExample# From Qt app
98
119
```
99
120
100
-
Expected CLI output:
121
+
Expected output:
101
122
102
123
```
103
124
Hello, world!
104
125
```
105
126
106
-
> Note: Apps built this way are unsigned.
127
+
> ⚠️ Note: Binaries are unsigned. You may need to bypass Gatekeeper to run them.
107
128
108
129
---
109
130
110
-
## Why Use This?
131
+
## 📚 Examples Included
111
132
112
-
-Build macOS-native apps without a Mac
113
-
-Automate macOS builds from a Windows development environment
114
-
-Learn Apple toolchain internals and cross-compilation techniques
133
+
-✅ CLI C Hello World
134
+
-✅ Cocoa GUI App (Objective-C + AppDelegate)
135
+
-✅ Qt Widgets GUI App
115
136
116
-
---
137
+
> Want Swift support? Coming soon.
117
138
118
-
## Examples Included
139
+
---
119
140
120
-
- C "Hello, World"
121
-
- Cocoa GUI App (Objective-C + AppDelegate)
122
-
- Qt GUI App (QtWidgets-based)
141
+
## 📜 License & Legal Note
123
142
124
-
> Want Swift? Coming soon.
143
+
This project is licensed under the MIT License (with a non-commercial use clause).
144
+
See the LICENSE file for more details.
125
145
126
146
---
127
147
128
-
## License & Legal Note
148
+
## 💬 Feedback
129
149
130
-
This project is licensed under the **MIT License** (with a non-commercial use clause).
131
-
See the [LICENSE](./LICENSE) file for more details.
150
+
If you found this project helpful, please open an issue with suggestions or improvements.
151
+
Contributions are welcome — feel free to submit a pull request!
132
152
133
153
---
134
154
135
-
## Feedback?
155
+
## 🔍 Keywords
136
156
137
-
If you found this project helpful, please feel free to share your thoughts by opening an issue with suggestions or improvements. Contributions are always welcome — feel free to submit a pull request!
157
+
macOS cross-compile • build macOS apps on Windows • Cocoa from Windows • Qt macOS SDK Windows • Clang CMake macOS • create macOS .app without Xcode • Ninja toolchain • Objective-C on Windows
0 commit comments