Cygwin & MinGW

This is a discussion on Cygwin & MinGW within the Tech Board forums, part of the Community Boards category; I have Cygwin & MinGW installed on my laptop. In the PATH variable , Cygwin has the higher priority. But ...

  1. #1
    TmX is offline
    Registered User TmX's Avatar
    Join Date
    Sep 2006

    Cygwin & MinGW

    I have Cygwin & MinGW installed on my laptop.
    In the PATH variable , Cygwin has the higher priority.
    But sometimes I want to invoke the MinGW GCC from the command line withoug CD-ing to it's installation directory

    Any suggestion ?

  2. #2
    Join Date
    Jan 2002
    Change the path environment variable for that process i.e.,
    set path=mingw_path;%path%
    A batch/cmd(*.bat or *.cmd) file is useful in this regard as you can do other stuff, too, such as invoke make or other tools if you want.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    I have my own "command" directory, where I put programs I want to run throguh command line. So there will be only my bat files and some console executables. You can make a bat file called "cyg.bat":
    SET PATH=cygwin_path;%path%
    and "mgw.bat":
    SET PATH=mingw_path;%path%
    So you can easily switch the path between Cygwin and MinGW by just "cyg" or "mgw".
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  4. #4
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Of course he could just have the batch file pass on the compiling as well:

    SET OLDPATH=%path%
    SET PATH=mingw_path;%path%
    g++ %1 %2 %3 %4 %5 %6 %7 %8 %9

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Setting SciTE to work with cygwin
    By Witchfinder in forum C Programming
    Replies: 1
    Last Post: 02-21-2009, 03:12 PM
  2. from dev-c++ mingw to netbeans cygwin
    By yahn in forum C++ Programming
    Replies: 10
    Last Post: 01-14-2009, 07:18 AM
  3. cygwin sshd weird behavior
    By jEssYcAt in forum Tech Board
    Replies: 6
    Last Post: 05-19-2008, 02:05 PM
  4. Problems with compiling code in cygwin
    By firyace in forum C++ Programming
    Replies: 4
    Last Post: 06-01-2007, 08:16 AM
  5. Cygwin Server
    By osal in forum Networking/Device Communication
    Replies: 0
    Last Post: 03-07-2005, 11:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21