Click here to Skip to main content
15,849,907 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: pkg_config ?? Pin
Richard MacCutchan18-Nov-16 22:55
mveRichard MacCutchan18-Nov-16 22:55 
GeneralRe: pkg_config ?? Pin
Jochen Arndt18-Nov-16 23:54
professionalJochen Arndt18-Nov-16 23:54 
GeneralRe: pkg_config ?? Pin
Richard MacCutchan19-Nov-16 2:21
mveRichard MacCutchan19-Nov-16 2:21 
GeneralRe: pkg_config ?? Pin
Vaclav_19-Nov-16 10:29
Vaclav_19-Nov-16 10:29 
GeneralRe: pkg_config ?? Pin
Richard MacCutchan19-Nov-16 13:03
mveRichard MacCutchan19-Nov-16 13:03 
AnswerRe: pkg_config ?? Pin
markkuk21-Nov-16 0:39
markkuk21-Nov-16 0:39 
GeneralRe: pkg_config ?? Pin
Vaclav_21-Nov-16 5:45
Vaclav_21-Nov-16 5:45 
GeneralRe: pkg_config ?? Pin
Vaclav_29-Nov-16 9:35
Vaclav_29-Nov-16 9:35 
Still struggling with the issue
Here is exact syntax I have used - it suppose to "print" , I assume substitute, the libraries in package ( opencv ) to the linker as -l options.
It does not matter if the options are --libs opencv or opencv --libs - which is expected.

"$(pkg-config opencv --libs)"

Here is partial liker output

make all
Building target: TEST_1
Invoking: GCC C++ Linker
<b>g++: error: missing argument to ‘-l’</b>
g++ -L/usr/local/lib -o "TEST_1" ./src/TEST_1.o <b>-l""</b>
make: *** [TEST_1] Error 1
makefile:45: recipe for target 'TEST_1' failed

I have tried different format / syntax and "$(command)" is correct per the link you have provided. From the output it is notable that no -l files were included - -l"".

I do not know what else can be wrong. The command does not expands to anything linker can use and it should look as terminal output.

jim-desktopUnsure | :~ $ pkg-config opencv --libs
-L/usr/local/lib -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_viz -lopencv_core


I have asked in several forums and all I am getting is how to add -L/-l options MANUALLY to the linker options.

BTW including ":" before the manually inserted file name specifies to the pkg-config to use library file WITHOUT using the file extension. Nice to know but does not solve my issue.

Cheers
Vaclav
Question#ifdef...#endif is not working in Resource(.rc) file Pin
Member 1233569517-Nov-16 18:20
Member 1233569517-Nov-16 18:20 
AnswerRe: #ifdef...#endif is not working in Resource(.rc) file Pin
Richard MacCutchan17-Nov-16 21:50
mveRichard MacCutchan17-Nov-16 21:50 
AnswerRe: #ifdef...#endif is not working in Resource(.rc) file Pin
leon de boer17-Nov-16 21:54
leon de boer17-Nov-16 21:54 
GeneralRe: #ifdef...#endif is not working in Resource(.rc) file Pin
Member 1233569517-Nov-16 22:43
Member 1233569517-Nov-16 22:43 
QuestionCMake - syntax error ? Pin
Vaclav_16-Nov-16 7:11
Vaclav_16-Nov-16 7:11 
AnswerRe: CMake - syntax error ? Pin
Jochen Arndt16-Nov-16 8:21
professionalJochen Arndt16-Nov-16 8:21 
GeneralRe: CMake - syntax error ? Pin
Vaclav_16-Nov-16 15:52
Vaclav_16-Nov-16 15:52 
GeneralRe: CMake - syntax error ? Pin
leon de boer16-Nov-16 19:10
leon de boer16-Nov-16 19:10 
GeneralRe: CMake - syntax error ? Pin
Jochen Arndt16-Nov-16 22:07
professionalJochen Arndt16-Nov-16 22:07 
QuestionSOLVED CMake whose "source directory" ? Pin
Vaclav_14-Nov-16 5:19
Vaclav_14-Nov-16 5:19 
AnswerRe: CMake whose "source directory" ? Pin
Chris Losinger14-Nov-16 5:25
professionalChris Losinger14-Nov-16 5:25 
GeneralRe: CMake whose "source directory" ? Pin
Vaclav_14-Nov-16 5:32
Vaclav_14-Nov-16 5:32 
GeneralRe: CMake whose "source directory" ? Pin
Chris Losinger14-Nov-16 5:46
professionalChris Losinger14-Nov-16 5:46 
GeneralRe: CMake whose "source directory" ? Pin
Vaclav_14-Nov-16 6:10
Vaclav_14-Nov-16 6:10 
AnswerRe: CMake whose "source directory" ? Pin
Albert Holguin15-Nov-16 8:22
professionalAlbert Holguin15-Nov-16 8:22 
GeneralRe: CMake whose "source directory" ? Pin
Vaclav_15-Nov-16 10:27
Vaclav_15-Nov-16 10:27 
AnswerRe: CMake whose "source directory" ? Pin
Vaclav_17-Nov-16 6:11
Vaclav_17-Nov-16 6:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.