you can rename the compiler's make.exe to make.ex, that will make it "go away" 
without deleting it, if you need it back, you can always rename it. another 
option is to simply change your PATH environment variable so that the compiler 
is last and MSYS path is before that. since searching for executables looks 
through the PATH to find the dir that a given executable is in to execute it,  
it only makes sense to put the compiler last.

in \msys\etc\profile put:
if [ $MSYSTEM == MINGW32 ]; then
  export PATH=".:/usr/local/bin:/mingw64h64t/bin:/bin:$PATH"
else
  export PATH=".:/usr/local/bin:/bin:/mingw64h64t/bin:$PATH"
fi

I have my compiler path identified in /etc/fstab by /mingw64h64t as the 
compiler which is 64-bit host, 64-bit target.
I have 2 installations of MSYS2, one for 32-bit target, and one for 64-bit 
target.





>________________________________
> From: Baruch Burstein <[email protected]>
>To: [email protected] 
>Sent: Tuesday, July 22, 2014 5:31 AM
>Subject: [Mingw-w64-public] MSYS2 issues
> 
>
>
>Hi,
>
>
>I (think I) found a bug in msys2. Here is a simple demo case:
>
>
>main.c:
>int main() { return 42; }
>
>
>
>Makefile:
>CC = gcc
>CC2 = $(shell which $(CC))
>out_1: clean main.c
>
>$(CC) main.c -o /home/username/out.exe
>out_2: clean main.c
>$(CC) /home/username/main.c -o out.exe
>out_3: clean main.c
>$(CC) main.c -o out.exe
>out_4: clean main.c
>$(CC2) main.c -o /home/username/out.exe
>out_5: clean main.c
>$(CC2) main.c -o out.exe
>clean:
>rm -f out.exe
>
>
>All 5 targets in the makefile should do the same thing, right?
>
>
>If I try to run target #1, I get:
>C:/Users/username/progs/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
> cannot open output file /home/username/out.exe: No such file or directory
>
>
>
>For #2 I get:
>gcc: error: /home/username/main.c: No such file or directory
>
>
>
>The other 3 work correctly.
>
>
>If I run the command in #1 or #2 manually from the msys bash prompt, it works 
>fine. It only fails using the makefile.
>When checking with Process Monitor, I found that in the first 2 cases, it was 
>trying to access the folder at C:\home\username\ , or in other words - it was 
>not translating the msys path to the real windows path.
>
>
>I am using:
>msys2-base-x86_64-20140704
>x86_64-4.9.1-release-posix-seh-rt_v3-rev0
>
>
>
>The make I am using is the mingw32-make included with the compiler version 
>above.
>
>-- 
>
>˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
>------------------------------------------------------------------------------
>Want fast and easy access to all the code in your enterprise? Index and
>search up to 200,000 lines of code with a free copy of Black Duck
>Code Sight - the same software that powers the world's largest code
>search on Ohloh, the Black Duck Open Hub! Try it now.
>http://p.sf.net/sfu/bds
>_______________________________________________
>Mingw-w64-public mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
>
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to