How to stop MinGW and MSYS from mangling path names given at the command line

前端 未结 4 604
时光取名叫无心
时光取名叫无心 2020-11-28 22:50

On Windows, I\'m cross-compiling a program for ARM/Linux using CodeSourcery\'s cross-compiler suite. I use MinGW MSYS as my command interpreter, and very often it will mangl

4条回答
  •  自闭症患者
    2020-11-28 23:41

    There is a way to suppress the path translation by setting MSYS_NO_PATHCONV=1 in Windows Git MSys or MSYS2_ARG_CONV_EXCL="*" in MSYS2.

    Alternatively, you can set the variable only temporarily just for that command by putting the assignment just before the command itself:

    MSYS_NO_PATHCONV=1 arm-none-linux-gnueabi-gcc.exe -Wall -g \
        -Wl,--dynamic-linker=/usr/lib/myrpath/ld-linux.so.3 \
        -Wl,-rpath=/usr/lib/myrpath \
        -I../targetsysroot/usr/include \
        myprogram.c -o myprogram
    

提交回复
热议问题