1 | initial version |
ok after a lot of trial and error debugging procedures (many thanks @berak) the following seems to do the trick:
g++ -o application main.cpp -I/usr/include/opencv -L/usr/lib -L/usr/share/opencv/3rdparty/lib -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_imgproc -lopencv_core -lopencv_hal -lopencv_highgui -lopencv_imgcodecs -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videoio -lopencv_videostab -lopencv_viz -lopencv_adas -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_datasets -lopencv_face -lopencv_latentsvm -lopencv_line_descriptor -lopencv_optflow -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_surface_matching -lopencv_text -lopencv_tracking -lopencv_xfeatures2d -lopencv_ximgproc -lopencv_xobjdetect -lopencv_xphoto -llibjpeg -llibpng -llibtiff -lippicv -lrt -ldl -lwebp -lz -lzlib -llibjasper -lQtGui -lQtCore -lQtOpenGL -lQtTest -lGL -lGLU -lglut -ltbb -lpthread
bear in mind that you need to have enabled the -DBUILD_ZLIB=ON
-DBUILD_TIFF=ON
-DBUILD_JASPER=ON
-DBUILD_JPEG=ON
-DBUILD_PNG=ON
-DBUILD_TBB=ON
flags during the opencv build otherwise you will need to use the -ljpeg
-lpng
-ltiff
-ljasper
instead. Unfortunately I did not manage to make OpenEXR to work so you will need to have -DBUILD_OPENEXR=OFF
and -DWITH_OPENEXR=OFF
flags as well. If you have build opencv with IPP, Qt and OpenGL as in my case then you will need the -lippicv
-lQtGui
-lQtCore
-lQtOpenGL
-lQtTest
-lGL
-lGLU
-lglut
respectively. Otherwise you do not need to include these libs.
Hope it helps, now and in the future someone.
2 | No.2 Revision |
ok after a lot of trial and error debugging procedures (many thanks @berak) the following seems to do the trick:
g++ -o application main.cpp -I/usr/include/opencv -L/usr/lib -L/usr/share/opencv/3rdparty/lib -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_imgproc -lopencv_core -lopencv_hal -lopencv_highgui -lopencv_imgcodecs -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videoio -lopencv_videostab -lopencv_viz -lopencv_adas -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_datasets -lopencv_face -lopencv_latentsvm -lopencv_line_descriptor -lopencv_optflow -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_surface_matching -lopencv_text -lopencv_tracking -lopencv_xfeatures2d -lopencv_ximgproc -lopencv_xobjdetect -lopencv_xphoto -llibjpeg -llibpng -llibtiff -lippicv -lrt -ldl -lwebp -lz -lzlib -llibjasper -lQtGui -lQtCore -lQtOpenGL -lQtTest -lGL -lGLU -lglut -ltbb bear in mind that you need to have enabled the -DBUILD_ZLIB=ON
-DBUILD_TIFF=ON
-DBUILD_JASPER=ON
-DBUILD_JPEG=ON
-DBUILD_PNG=ON
-DBUILD_TBB=ON
flags during the opencv build otherwise you will need to use the -ljpeg
-lpng
-ltiff
-ljasper
instead. Unfortunately I did not manage to make OpenEXR to work so you will need to have -DBUILD_OPENEXR=OFF
and -DWITH_OPENEXR=OFF
flags as well. If you have build opencv with IPP, Qt and OpenGL as in my case then you will need the -lippicv
-lQtGui
-lQtCore
-lQtOpenGL
-lQtTest
-lGL
-lGLU
-lglut
respectively. Otherwise you do not need to include these libs.
Hope it helps, now and in the future someone.
3 | No.3 Revision |
ok after a lot of trial and error debugging procedures (many thanks @berak) @berak for his help and his time) the following seems to do the trick:
g++ -o application main.cpp -I/usr/include/opencv -L/usr/lib -L/usr/share/opencv/3rdparty/lib -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_imgproc -lopencv_core -lopencv_hal -lopencv_highgui -lopencv_imgcodecs -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videoio -lopencv_videostab -lopencv_viz -lopencv_adas -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_datasets -lopencv_face -lopencv_latentsvm -lopencv_line_descriptor -lopencv_optflow -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_surface_matching -lopencv_text -lopencv_tracking -lopencv_xfeatures2d -lopencv_ximgproc -lopencv_xobjdetect -lopencv_xphoto -llibjpeg -llibpng -llibtiff -lippicv -lrt -ldl -lwebp -lz -lzlib -llibjasper -lQtGui -lQtCore -lQtOpenGL -lQtTest -lGL -lGLU -lglut -ltbb -lpthread
bear in mind that you need to have enabled the -DBUILD_ZLIB=ON
-DBUILD_TIFF=ON
-DBUILD_JASPER=ON
-DBUILD_JPEG=ON
-DBUILD_PNG=ON
-DBUILD_TBB=ON
flags during the opencv build otherwise you will need to use the -ljpeg
-lpng
-ltiff
-ljasper
instead. Unfortunately I did not manage to make OpenEXR to work so you will need to have -DBUILD_OPENEXR=OFF
and -DWITH_OPENEXR=OFF
flags as well. If you have build opencv with IPP, Qt and OpenGL as in my case then you will need the -lippicv
-lQtGui
-lQtCore
-lQtOpenGL
-lQtTest
-lGL
-lGLU
-lglut
respectively. Otherwise you do not need to include these libs.
Hope it helps, now and in the future someone.