[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fedora-list
Subject:    Re: OpenCV with Eclipse on Fedora 30
From:       "George N. White III" <gnwiii () gmail ! com>
Date:       2020-02-06 22:36:35
Message-ID: CAKTOP457s5hquCegZhi0kRs-o4r=oBQe9h1mEquAocbhh56xmA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, 6 Feb 2020 at 15:04, Danishka Navin <danishka@gmail.com> 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.fc30.x86_64
> opencv-core-3.4.4-10.fc30.x86_64
> opencv-contrib-3.4.4-10.fc30.x86_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
>

libopencv_core.so.3.4 should be a symbolic link to libopencv_core.so.3.4.4,
same for libopencv_highgui.so.3.4. Try:

g++ -o "sample"  ./main.o -lopencv_core -lopencv_highgui

Stackoverflow
<https://stackoverflow.com/questions/13904117/compiling-and-linking-opencv-in-ubuntu-12-04>
has
this among other solutions.


> /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
>
>
-- 
George N. White III

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div \
dir="ltr"><div dir="ltr">On Thu, 6 Feb 2020 at 15:04, Danishka Navin &lt;<a \
href="mailto:danishka@gmail.com">danishka@gmail.com</a>&gt; wrote:<br></div><div \
class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
dir="ltr"><div>Hi,</div><div><br></div><div>I am new to eclipse and opencv and I was \
trying to build a sample c++ code using Eclipse.</div><div><br></div><div>I have \
installed following packages. <br></div><div>rpm -qa | grep \
opencv<br>opencv-devel-3.4.4-10.fc30.x86_64<br>opencv-3.4.4-10.fc30.x86_64<br>opencv-c \
ore-3.4.4-10.fc30.x86_64<br>opencv-contrib-3.4.4-10.fc30.x86_64<br></div><div><div><br></div><div><br></div>00:29:09 \
**** Incremental Build of configuration Debug for project sample ****<br>make all \
<br>Building target: sample<br>Invoking: GCC C++ Linker<br>g++ -L/usr/lib64/ \
-L/usr/lib/ -o &quot;sample&quot;   ./main.o    -llibopencv_core.so.3.4 \
-llibopencv_core.so.3.4.4 -llibopencv_highgui.so.3.4 \
-llibopencv_highgui.so.3.4.4<br></div></div></blockquote><div><br></div><div><span \
style="color:rgb(0,0,0);font-size:medium"><font \
face="monospace">libopencv_core.so.3.4</font> should be a symbolic link to <font \
face="monospace">libopencv_core.so.3.4.4</font>, same for  </span><span \
style="color:rgb(0,0,0);font-size:medium"><font \
face="monospace">libopencv_highgui.so.3.4. </font><font face="arial, \
sans-serif">Try:</font></span></div><div><span \
style="color:rgb(0,0,0);font-size:medium"><font face="arial, \
sans-serif"><br></font></span></div><div><font face="monospace"><span \
style="color:rgb(0,0,0);font-size:medium">g++ -o &quot;sample&quot;   ./main.o  \
</span></font><span style="color:rgb(0,0,0);font-size:medium;font-family:monospace">-lopencv_core \
</span><span style="color:rgb(0,0,0);font-size:medium"><font \
face="monospace">-lopencv_highgui</font></span><span \
style="font-size:medium;color:rgb(0,0,0);font-family:monospace">  \
</span></div><div><span \
style="font-size:medium;color:rgb(0,0,0);font-family:monospace"><br></span></div><div><a \
href="https://stackoverflow.com/questions/13904117/compiling-and-linking-opencv-in-ubuntu-12-04">Stackoverflow</a> \
has this among other solutions.<br></div><div>  </div><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>/usr/bin/ld: cannot find \
-llibopencv_core.so.3.4<br>/usr/bin/ld: cannot find \
-llibopencv_core.so.3.4.4<br>/usr/bin/ld: cannot find \
-llibopencv_highgui.so.3.4<br>/usr/bin/ld: cannot find \
-llibopencv_highgui.so.3.4.4<br>collect2: error: ld returned 1 exit status<br>make: \
*** [makefile:46: sample] Error 1<br>&quot;make all&quot; terminated with exit code \
2. Build might be incomplete.<br><br>00:29:10 Build Failed. 5 errors, 0 warnings. \
(took 419ms)</div><div><br></div><div><br></div><div>$ locate \
opencv_core.so.3.4<br>/usr/lib64/libopencv_core.so.3.4<br>/usr/lib64/libopencv_core.so.3.4.4</div><div><br></div><div>I \
have already added /usr/lib64/ and /usr/lib/ as library search paths in \
eclipse.<br></div><div><br></div><div>Is there anything missing in my \
config?<br></div><div><br clear="all"></div><div>Regards,<br></div><div>-- <br><div \
dir="ltr"><div dir="ltr"><div><div dir="ltr"><div>Danishka \
Navin<br><br></div></div></div></div></div></div></div></blockquote></div><div><br></div>-- \
<br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>George N. White \
III<br><br></div></div></div></div></div></div></div></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic