![]() |
|
| Daemon News Ezine | BSD News | BSD Mall | BSD Support Forum | BSD Advocacy | BSD Updates |
Cross compiling from FreeBSD to WindowsDavid Yeske <dyeske@daemonnews.org>This article explains how to cross compile from FreeBSD to Windows. This is possible because of the MinGW compiler which has been ported to FreeBSD and exists in the ports collection. We will use the PuTTY program, a gui ssh suite of utilities, as an example and cross compile it to run on windows. We will step you through modifying the existing FreeBSD ports framework to make this work. After the initial modification, other ports could be used to create windows binaries. Cross compiling directionsThis cookbook style guide will allow you to quickly begin cross compiling programs for windows.
Results
$ file *.exe pageant.exe: MS Windows PE 32-bit Intel 80386 GUI executable not relocatable plink.exe: MS Windows PE 32-bit Intel 80386 console executable not relocatable pscp.exe: MS Windows PE 32-bit Intel 80386 console executable not relocatable psftp.exe: MS Windows PE 32-bit Intel 80386 console executable not relocatable putty.exe: MS Windows PE 32-bit Intel 80386 GUI executable not relocatable puttygen.exe: MS Windows PE 32-bit Intel 80386 GUI executable not relocatable puttytel.exe: MS Windows PE 32-bit Intel 80386 GUI executable not relocatable The resulting binarys can be run in Windows or under Wine. AcknowledgmentsI would like to thank the authors of MinGW and the various people that gave me feedback. $Id: crosscompile,v 1.20 2004/09/09 05:58:18 www Exp $ |