ubuntu - strange opencv.pc (pkg-config) file -


I have created opencv on Ubuntu 12.04 64bit. If I issue the following command I can link opencv libraries have:

  g ++ `pkg-config opencv - cflags` my_code.cpp -o my_code` pkg-config opencv - -libs`   

However, if I issue the following command:

  GCC-G-O-2-Y-valve -vino unused -vino -Multi-O main main. -lcx -lcv -lhighgui -lcvaux   

I have:

  / usr / bin / ld: can not find -lcxcore / usr / bin / ld : -lcv / usr / bin / ld: can not be found: -lighgui / usr / bin / ld: can not be found -lcvaux collect2: ld 1 exit status   

problem Problems were released in the shoot:

  pkg-config --libs opencv   

and found:

/ usr / local / lib / Libopenkw_kalib3dkso /usr/lokl/lib/libopenkw_contribkso /usr/lokl/lib/libopenkw_korkso /usr/lokl/lib/libopenkw_fecchars2dkso /usr/lokl/lib/libopenkw_flannkso / sterile / local / lib / libopencv_gpu.so /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_legacy.so / usr / local / lib / l Ibopencv_ml.so / u sr / local / lib / libopencv_nonfree.so /usr/local/lib/libopencv_objdetect.so /usr/local/lib/libopencv_photo.so /usr/local/lib/libopencv_stitching.so / usr / local / lib / I think Explains this problem but I do not understand why opencv.pc is not included in it. Little hand for library locations like PC file "-Lib" format any ideas ??

You must include the location of the library header which pkg-config provides to you

  pkg-config opencv - cflags   

For me, the output is

- I / usr / local / included / opencv-I / Usr / local / include

If you add, then it should work fine

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -