Thursday, 28 January 2010

Mingw and Visual Studio

Mingw is a great environment for building stuff on Windows especially for apps that came from UNIX environments. It provides a gcc compiler for Windows that links directly against the Windows libraries (as opposed to Cygwin that uses an intermediate library to achieve compatibility).

If you're working on projects that combine Mingw and Microsoft's Visual Studio environment (VS2008 etc) then here are a few things that are useful to know:
  • How to get Mingw/Msys to pick up or import VS environment (e.g. for include paths etc):
    • Add the line below (change version of VS if necessary) to C:\MinGW\msys.bat
      • Call "C:/Program Files/Microsoft Visual Studio 9.0/Common7/Tools/vsvars32.bat"
  • How to add other tools to the path for Mingw/Msys (e.g. Collabnet's svn):
    • Add the line below to /etc/profile (within msys) or C:\MinGW\etc\profile:
      • export PATH="/c/Program Files/CollabNet/Subversion Client:$PATH"

No comments:

Post a Comment