I tried to write platform-independent build file (for ninja) and try to avoid specifying the full paths such as D:/tools/x64/msys2/ucrt64/include/librsvg-2.0
or /usr/include/librsvg-2.0
.
GCC docs say that
If dir begins with '=' or $SYSROOT, then the '=' or $SYSROOT is replaced by the sysroot prefix; see --sysroot and -isysroot.
But on Windows with MSYS2 environment when I set flags like -I=librsvg-2.0
or -I=/librsvg-2.0
it has no effect. Can it be MSYS2 only behaviour, or I do something wrong?
Well, GCC has own system include paths, but it doesn't have the default $SYSROOT value. So first you need to set it using the --sysroot=your_path
flag, if you want use -I=
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.