从(开放的)Solaris 交叉编译到 Windows?
有什么方法可以从 Solaris 或 OpenSolaris 设置交叉编译适用于 Windows(XP、Vista、Win7)的 C/C++ 代码,最好是 64 位和 32 位(对于 Vista 和 Win7)?我的代码库已经是跨平台的,我想作为自动化过程的一部分从 Solaris 或 Linux 对其进行交叉编译(生成 Windows DLL 和 EXE)。
我想使用 GCC 套件,如果可能的话,不想使用 Cygwin DLL。
如果可能的话,我的 Solaris 环境中需要哪些工具?我将如何编译/链接整个项目?
如果这在 Solaris 中不可能,考虑到我想要为我提到的所有 Windows 版本提供 32 位和 64 位二进制文件,我应该如何从 Linux 继续进行?
预先感谢您的任何帮助!
Is there any way I can cross-compile C/C++ code for Windows (XP, Vista, Win7), ideally in 64-bit as well as 32-bit (for Vista and Win7), from a Solaris or OpenSolaris setup? My codebase is already cross-platform, I would like to cross-compile it (generate windows DLLs and EXEs) from Solaris or Linux as part of an automated process.
I would like to use the GCC suite, and would rather not need to use the Cygwin DLLs, if possible.
If it is possible, which tools would I need in my Solaris environment? How would I go about compiling/linking an entire project?
If this is not possible in Solaris, how should I proceed from Linux, considering I would like 32- and 64-bit binaries for all of the versions of Windows I have mentioned?
Thanks in advance for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我不确定您是否需要交叉编译(在 Solaris 机器上创建 Windows EXE 文件)或跨平台(在 Solaris 或 Windows 上编译的代码)。后者更容易,要做到这一点,您应该首先在您的计算机上安装 MinGW 版本的 GCC 编译器窗户框。
I'm not sure if you want cross-compilation (creation of Windows EXE files on the the Solaris box) or cross-platform (code that compile on Solaris or Windows). The latter is easier, and to do it you should start by installing the MinGW version of the GCC compiler on your Windows box.
如何:创建跨 Win32 和 Win64 编译器< /a>
howto: Creating a cross Win32 and Win64 compiler
Windows 没有 64 位交叉编译器,你必须使用 MSVC 编译器来编译:(
There is no 64-bit cross-compiler for Windows, you have to compile it using MSVC compiler :(
呃,为什么不通过执行远程构建过程来自动化构建过程呢?这就是我们所做的 - 我们在 Windows 机器上安装了 CruiseControl.NET,它可以通过 sshexec 在 Linux 和 Solaris 上执行远程构建。我确信反过来也是有可能的。
Er, why not just automate your build process by performing a remote build process? It's what we do - we have CruiseControl.NET on a Windows box which performs remote builds on Linux and Solaris via sshexec. I'm sure it would be possible the other way round.