you could try to build / link a static version of opencv_core,
so you dont have to deploy a seperate so/dll,
by adding -DBUILD_SHARED_LIBS=OFF to the cmake cmdline
also: -DBUILD_LIST=core,imgproc` to avoid building other (unwanted) modules
with static libs, you dont need to install/deploy the so’s (assuming you cross-compile)
but you still need -lopencv_imgproc -lopencv_core -littnotify -lrt -ldl -lz -lpthread to link your own prog
and just for comparison - libopencv_core.so is 10.3mb here, but a (stripped) prog, statically linked against core only is 2.7mb
I am not clear. I already have opencv installed on the system.
After your comment I am not sure which case should I proceed with. Case 1, run the cmake as it is but with suggested flags from your response. Case 2, where I should copy the header files I need, and then run the cmake.
Currently buidling opencv library statically.
Error I am getting.
/usr/bin/ld: cannot find -littnotify
/usr/bin/ld: /home/nile649/opencv_build/opencv/build/lib/libopencv_core.a(opencl_core.cpp.o): in function `opencl_check_fn(int)':
opencl_core.cpp:(.text._ZL15opencl_check_fni+0xe1): warning: Using ‘dlopen’ in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: error: ld returned 1 exit status
make: *** [CMakeFiles/csrt.dir/build.make:178: csrt] Error 1
make: *** [CMakeFiles/Makefile2:76: CMakeFiles/csrt.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Above issues resolved, I am updating the cmake file
The current errors
Errors regarding window_gtk.cpp
window_gtk.cpp:(.text.cvResizeWindow+0x10a): undefined reference to `gtk_window_resize’
Errors regarding the ffmpeg
cap_ffmpeg.cpp:(.text.ZN23InputMediaStream_FFMPEG4openEPKcPiS2_S2_S2+0x9a): undefined reference to `avformat_network_init’
Errors regarding the cap_gstreamer.cpp
cap_gstreamer.cpp:(.text._ZN2cv23CvVideoWriter_GStreamerD2Ev[_ZN2cv23CvVideoWriter_GStreamerD5Ev]+0x4d): undefined reference to `gst_object_unref’
what kind of hardware are you trying with, exactly ??
what kind of os is there (if at all !) ?
do you really expect to connect it to a monitor & run windowed programs / gui ?
where would your (image) input come from ?
do you actually need video(file / url) handling (i doubt so !) ?
cut down the requirements to a bare minimum, before proceeding !