我在 Windows 上构建了一个 C++ 程序,如何为 MacOS 编译可执行文件?

I built a C++ program on Windows, how can I compile an executable for MacOS?

我在 Windows 上构建了一个 C++ 小程序,我想与一些人分享它,但他们在 MacOS 上。我可以使用哪些工具来编译可执行文件(例如 Windows 的 .exe)并将项目共享给他们?如果需要,我有一个 MacOS VM。

使用 Xcode 构建您的资源。或者尝试使用 WINE (https://www.winehq.org/)

运行 .exe