On Fri, 2020-02-07 at 00:33 +0530, Danishka Navin wrote:
Hi,

I am new to eclipse and opencv and I was trying to build a sample c++ code using Eclipse.

I have installed following packages.
rpm -qa | grep opencv
opencv-devel-3.4.4-10.fc30.x86_64
opencv-3.4.4-10.fc30x86_64
opencv-core-3.4.4-10.fc30.x86_64
opencv-contrib-3.4.4-10.fc30x86_64




00:29:09 **** Incremental Build of configuration Debug for project sample ****
make all
Building target: sample
Invoking: GCC C++ Linker
g++ -L/usr/lib64/ -L/usr/lib/ -o "sample"  ./main.o   -llibopencv_core.so.3.4 -llibopencv_core.so.3.4.4 -llibopencv_highgui.so.3.4 -llibopencv_highgui.so.3.4.4
/usr/bin/ld: cannot find -llibopencv_core.so.3.4
/usr/bin/ld: cannot find -llibopencv_core.so.3.4.4
/usr/bin/ld: cannot find -llibopencv_highgui.so.3.4
/usr/bin/ld: cannot find -llibopencv_highgui.so.3.4.4
collect2: error: ld returned 1 exit status
make: *** [makefile:46: sample] Error 1
"make all" terminated with exit code 2. Build might be incomplete.

00:29:10 Build Failed. 5 errors, 0 warnings. (took 419ms)


$ locate opencv_core.so.3.4
/usr/lib64/libopencv_core.so.3.4
/usr/lib64/libopencv_core.so.3.4.4

I have already added /usr/lib64/ and /usr/lib/ as library search paths in eclipse.

Is there anything missing in my config?

Regards,
--
Danishka Navin

I haven't done this in a while, but there were some changes to bash environment I seem to remember. Either LIBRARY_PATH or LD_LIBRARY_PATH or something similar. I've completely rebuilt my system since then, so I don't have the old bashrc to check. But the opencv stuff documents it on their webpage I think.

REgards,
Les H