一個pkg-config的問題 - Linux

Table of Contents

大家好

小弟想要用opencv編譯test1.cpp

g++ pkg-config opencv --libs --cflags test1.cpp

會出現
cc1plus: error: unrecognized command line option "-flibs"
cc1plus: error: unrecognized command line option "-fcflags"

使我無法正常編譯

但是改成

g++ ` pkg-config opencv --libs --cflags ` test1.cpp

在這兩個地方加上`後

就可以正常編譯

請問小弟該如何解釋這個問題跟解法?

謝謝各位版友的指教

--
~宅男的四個徵兆~
∠□ ○ ! * \○/ ★    (○ ?
╦╦└□ " ○□═ □   □>
║║√√ ╦══╦ ∥    |\
一回家就上PTT 每天想正妹 以當好人為樂 忘記正妹虧欠自己

--

All Comments

Joe avatarJoe2012-03-17
shell command subsitution