41
Help / Re: Stripping debug info from output tree
« Last post by stahta01 on March 09, 2025, 07:45:23 pm »You cannot expect a batch file to work using an bash/sh shell! Change the shell or edit the batch file to work.
Tim S.
Tim S.
When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.
Using an MSYS2 UCRT64 bash shell on my Windows 10 setup, I see that I have:I got 4 strip.exe$ where strip
C:\msys64\ucrt64\bin\strip.exe
C:\msys64\usr\bin\strip.exe
$ pacman -Qo /ucrt64/bin/strip.exe
/ucrt64/bin/strip.exe is owned by mingw-w64-ucrt-x86_64-binutils 2.44-1
$ pacman -Qo /usr/bin/strip.exe
/usr/bin/strip.exe is owned by binutils 2.44-1
If you feed tentative shell commands through something like$(TARGET_COMPILER_DIR)..\usr\bin\env MSYSTEM=UCRT64 CHERE_INVOKING=1 /usr/bin/bash -lc
you can let MSYS2 find the best version to use. In the above instance, it will use an /ucrt64/bin version if exists; otherwise it will look for what essentially is a Cygwin based version in /usr/bin. If that also fails, it will then look for a system version.$ where xcopy
C:\Windows\System32\xcopy.exe
Unfortunately, syntax for Windows xcopy is:xcopy <Source> [<Destination>] [/w] [/p] [/c] [/v] [/q] [/f] [/l] [/g] [/d [:MM-DD-YYYY]] [/s [/e]] [/t] [/k] [/r] [/h] [{/a | /m}] [/n] [/o] [/x] [/exclude:FileName1[+[FileName2]][+[FileName3]]] [{/y | /-y}] [/z] [/j] [/compress]
Note, all options come after file specifiers, not before! It's easy enough to make a version of things with the xcopy options flipped to after all file specifiers. These command files like never change.
I have prepared and attached simple demo. Created it from wxwidgets template project. You must change compiler settings, linker settings and search directories in debug mode to your own because I have wxwidgets installation in custom home directory. Problematic variables are: mListCtrlSources and thisNOTwork (I already started they with -> )
wxStaticBoxSizer * staticBoxSource = new wxStaticBoxSizer(wxHORIZONTAL, this, "Source dirs && files");
wxListCtrl* mListCtrlSources = new wxListCtrl(this, -1);
mListCtrlSources->
... and others ..
$ where strip
C:\msys64\ucrt64\bin\strip.exe
C:\msys64\usr\bin\strip.exe
$ pacman -Qo /ucrt64/bin/strip.exe
/ucrt64/bin/strip.exe is owned by mingw-w64-ucrt-x86_64-binutils 2.44-1
$ pacman -Qo /usr/bin/strip.exe
/usr/bin/strip.exe is owned by binutils 2.44-1
$(TARGET_COMPILER_DIR)..\usr\bin\env MSYSTEM=UCRT64 CHERE_INVOKING=1 /usr/bin/bash -lc
$ where xcopy
C:\Windows\System32\xcopy.exe
xcopy <Source> [<Destination>] [/w] [/p] [/c] [/v] [/q] [/f] [/l] [/g] [/d [:MM-DD-YYYY]] [/u] [/i] [/s [/e]] [/t] [/k] [/r] [/h] [{/a | /m}] [/n] [/o] [/x] [/exclude:FileName1[+[FileName2]][+[FileName3]]] [{/y | /-y}] [/z] [/b] [/j] [/compress]