Dave Horner's Website - Yet another perspective on things...
Home Tech Talk Windows OS Windows and Cygwin/MinGW/coLinux - dump some GPL in your WIN32
46 guests
Rough Hits : 1788409
moon and stars

Windows and Cygwin/MinGW/coLinux - dump some GPL in your WIN32

Monday, 23 October 2006 15:13

Cygwin

Cygwin is a unix/linux envirnoment for the windows platform. Basically, you can install and manage code that is cross platform compiled using your autoconf, perl, python, X11, etc.

I am still learning how to properly use cygwin to build projects. I would like to start using cygwin for all my building needs.

My hope is that I can use the nmake and msbuild tools to maintain binary comp. between the cygwin and VS2005 ide builds.

Cygwin has always been a black magic of the unix zeolot. It isn't that hard to learn, but I really need to make some sort of standard install package that setups my enviroment and allows for building to happen quickly from a bare install.

Windows and Cygwin tweaks
The except from How to build the code for Thinking in Patterns with Java by Bruce Eckel has a walk through on how to setup some things in Cygwin.

Cygwin is great, once you've got it all setup and things are working great. It can be a lot of work to get it all going. I found this env. fetcher, which pulls all the packages needed to build pidgin. I'd like to see more of this sort of thing for other projects.
SimGuy's Pidgin Stuff - Windows Pidgin Build Environment Fetcher
Win32CompileCygwin - VideoLAN Wiki - building VideoLAN in cygwin.
puttycyg - Use PuTTY as a local Cygwin terminal.
Sofeng's Blog: Cygwin, X, ratposoin, screen, rxvt setup

Make and configure sometimes do very strange things when presented a DOS formatted file. Make will not build properly and configure will give this wonderfully cryptic message:
./configure: line 9: $'\r': command not found
To fix it, just run dos2unix * and ensure that proper formatting is enforced.

cygwin will modify your PATH env

bash - Cygwin: Perl script $ENV{PATH} call returns unix path. How do I change it? - Stack Overflow


blead perl cygwin dl library missing || strawberry perl mingw and cygwin don't mix

by default cygwin will import the path of the system into the cygwin shell. I found that I could not build perl build properly because it was mixing strawberry and cygwin components. To resolve the -ldl; (i ultimately left it in), I removed all the strawberry paths from my PATH env before running configure. ie. "export PATH=/usr/local/bin:/usr/bin" You will see that configure no longer finds the strawberry binaries and default settings provide a working build.
#31999: Under cygwin, cygwin's 'cpan' is used instead of Strawberry's 'cpan.bat' - other people apparently want Strawberry in their cygwin, "Strawberry is not compatible with cygwin. Closing."
I was able to produce a 5.21.3 that worked; issue being all the MyConfig.pm and other setting which were pointing to strawberry perl's env. which is resolved by overriding HOME and creating a basic empty config; followed by cpan: o conf init.
export HOME=/cygdrive/d/working/perl/build
mkdir $HOME/.cpan/CPAN/ 
echo "\$CPAN::Config->{cpan_home}='$HOME/.cpan';" > $HOME/.cpan/CPAN/MyConfig.pm

cygwin check prereqs.

cygcheck -c  \
       bash binutils bzip2 cygwin gcc-core gcc-g++ gcc-java gzip m4 make unzip zip


cygwin install from cmdline

use the installer from the cmdline without any GUI interaction. find your package name using the web Cygwin Package List
setup-x86.exe -q -P packagename1,packagename2
How do I install cygwin components from the command line? - Stack Overflow
apt-cyg - A command-line software installer for Cygwin - Google Project Hosting
cyg-apt - A command line package manager for Cygwin - Google Project Hosting

Cygwin X11

Cygwin includes an x windows server called xorg-server. Remember to use xhost to allow remote hosts access to the x server. To allow a single remote host, do "xhost +your.ip.add.res". Or allow all remote hosts by performing an "xhost +".


Install a C++11 std. compliant gcc in cygwin

try building it yourself gcc/g++ 4.7.2 on Cygwin
download a package MinGW-w64 - for 32 and 64 bit Windows - Browse /Toolchains targetting Win32/Personal Builds/rubenvb at SourceForge.net


MinGW

MinGW Starter Guide
MinGW - Home
Installing MinGW, compiling Perl and vim
Dev-C++
A Moron's Guide to Creating and Using Your Own Cygwin or Mingw DLL's when Compiling Cygwin or Mingw Programs
MinGW - nuwen.net
MinGW: pexports for Windows DLLs | For Bharat
Compiling mspdebug for Windows using MinGW | For Bharat
Thoughts on C++: Building Qt5 with MinGW lots of other mingw info on Thoughts on C++


msysgit, very cool Google code project. If you use: GitMe it will automagically build a developer environment for git with MinGW!


coLinux

coLinux lets you run Linux natively within windows. This is full blown linux on the windows machine...not a compatible/striped down environment like cygwin/mingw.
Virtualization with coLinux
Portable Ubuntu for Windows - uses coLinux internally, but looks to be very easy to setup....


Wine - run windows apps in linux

WineHQ - Run Windows applications on Linux, BSD, Solaris and Mac OS X - Wine enables Linux, Mac, FreeBSD, and Solaris users to run Windows applications without a copy of Microsoft Windows.
Downloads | Wine-Doors - Wine-doors is an application designed to make installing windows software on Linux, Solaris or other Unix systems easier. Wine-doors is essentially a package management tool for windows software on Linux systems.
Last Updated on Thursday, 14 August 2014 17:17