I can build this branch under Windows.
But I don't know how to test it.
I can write some code in the compiler include search path, such as:
Then, I got such build command line:
g++.exe -Wall -fexceptions -g -I"`echo aaa`" -c D:\code\test_git_temp\test_cmdcmd\main.cpp -o obj\Debug\main.o
It looks like the backtick not get executed?
What happens without the quotes?
Generally backticks are more useful in the compiler or linker options and not for search paths.
If I remove the backtick, then the build log becomes:
g++.exe -Wall -fexceptions -g -I"echo aaa" -c D:\code\test_git_temp\test_cmdcmd\main.cpp -o obj\Debug\main.o
Then backticks are not meant to be used there. Use them in the other places.
I put this line:
In the linker settings->Other linker options, and it works, here is the log:
g++.exe -o bin\Debug\test_cmdcmd.exe obj\Debug\main.o -lm
Output file is bin\Debug\test_cmdcmd.exe with size 60.84 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
I think the backtick should also enabled in the search path settings, because for example, we can use
something like: eranif/wx-config-msys2: wx-config tool for MSYS2 based installation of wxWidgets using the mingw64 repository (https://github.com/eranif/wx-config-msys2), Oh, maybe, those tools can be only used in the "Other linker options" or "Other Compiler options". So, we don't need use backtick in the search directories.
You don't need them there. wx-config works fine on linux as it is now.
The good news is that eranif's wx-config-msys2 tool also works well with our C::B's backtick system.
I try to add those lines in the "Other linker options"
`wx-config-msys2 --libs --prefix=$(TARGET_COMPILER_DIR)`
And I got the final result of the linke command:
-LF:\code\msys2-64\mingw64\\lib -pipe -Wl,--subsystem,windows -mwindows -lwx_mswu_xrc-3.1 -lwx_mswu_html-3.1 -lwx_mswu_qa-3.1 -lwx_mswu_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1
The only issue is that for C::B, we have $(TARGET_COMPILER_DIR) translated to "F:\code\msys2-64\mingw64\", while, wx-config-msys2 expect there is no ending backslash for the path, so you see double backslashes in the generated command line.
FYI:
I recently found that msys2 has a nice tool named pkg-config, which is located in msys2_root/mingw64/bin/pkg-config.exe
Now, I see in code::blocks, it can support many libraries. For example, if you want to link opencv library.
You just have to add one line in compiler options in C::B build option
`pkg-config --cflags opencv4`
and in library options in C::B build option
`pkg-config --libs opencv4`
Really nice feature, also, I think it should also work under Linux. :)