Fish's command substitution is supposed to be the equivalent of Bash's $()
yet this simple example fails:
g++ -std=c++14 -Wall -Wextra -pedantic -g (pkg-config --cflags sdl2) \
test.cpp (pkg-config --libs sdl2)
/usr/bin/ld: cannot find -lSDL2
If I run it in Bash, it works perfectly fine. Also typing -lSDL2
instead of using pkg-config
works as well.
To clarify, there's nothing wrong with pkg-config
:
echo (pkg-config --libs sdl2)
-lSDL2
Why does this not work for Fish?