|
From: John B. <joh...@ho...> - 2006-10-02 22:58:56
|
Hello I have Mingw (gcc-3.4.2) installed in c:\mingw. I have MSYS installed as well. I wanted to try the gcc 4.1 at http://oss.netfarm.it/mplayer/misc/gcc-mingw32-4.1.1.tar.gz. I did the following: I renamed my existing c:\mingw as c:\mingw3 and installed the mingw-4.1 in c:\mingw4. I created etc\fstab3 and etc\fstab4 with c:\mingw3 and c:\mingw4 mounted on \mingw. I copied msys.bat end edited each copy to overwrite etc\fstab appropriately before starting the MSYS shell. Initially, I did not rename the mingw4 gcc (called gcc-4.1.exe, etc.). The binutils programs never had a version number appended to them. I ran the configure script for the package that I was trying to build like this: CC=gcc-4.1 ./configure etc. It did use gcc-4.1, but it seems that gcc-4.1 was looking for header files in c:/mingw/include (and not /mingw/include as I expected, because the configure script detected libraries that I had not yet installed into c:\mingw4. I always assumed that gcc's include path would be relative to the directory that the executanle is in. Eventually, I renamed c:\mingw4 as c:\mingw and removed the version numbers from gcc programs (windres tried to execute gcc). Is there a way for me to run gcc 3.x and gcc 4.x on the same computer and easily switch between them by setting the environment appropriately? |