bash - Error in using pkg-config with gcc in fish -
i use fish shell on fedora 19. trying compile this simple gtkmm example.
when try compile using following command in fish:
g++ sample.cc -o sample `pkg-config gtkmm-3.0 --cflags --libs`
it shows following errors:
g++: error: `pkg-config: no such file or directory g++: error: gtkmm-3.0: no such file or directory g++: error: unrecognized command line option ‘--cflags’ g++: error: unrecognized command line option ‘--libs`’
whereas, when use bash same thing, compiles correctly. means pkg-config fetch correct flags.
i started using fish don't know wrong there. can please me this?
also, first question on stackoverflow. hello guys.
thank you.
fish shell uses ( )
command substitution, rather backticks bash uses. see: the fish tutorial. why it's not working you, it's unlikely issue path.
i don't quite understand why, reason if replace backticks parentheses, you'll encounter another error (where ...
output pkg-config
):
g++: error: unrecognized command line option '... '
you can around using fish command eval
. so:
eval g++ sample.cc -o sample (pkg-config gtkmm-3.0 --cflags --libs)
ought work.
Comments
Post a Comment