<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Installing OpenCV 2.1 in Ubuntu</title>
	<atom:link href="http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/</link>
	<description>My past and current projects</description>
	<lastBuildDate>Wed, 08 Feb 2012 06:37:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: samontab</title>
		<link>http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/comment-page-2/#comment-432</link>
		<dc:creator>samontab</dc:creator>
		<pubDate>Wed, 18 Jan 2012 12:52:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.samontab.com/web/?p=41#comment-432</guid>
		<description>OpenCV changed how to include its libraries. That is why -lcv is not found anymore, it was used in previous versions of OpenCV.

You have to change the make script for your code to make it compatible with this and newer versions of OpenCV.

You should always use pkg-config to make your programs instead of hard coding the libraries (I guess -lcv is hardcoded in your make script, or if not, then there may be other OpenCV installations)

For example, if you have a source code in the file MyFile.cpp and you are using OpenCV in it, you should compile it this way:

&lt;code&gt;g++ `pkg-config --cflags --libs opencv` -o MyApp MyFile.cpp&lt;/code&gt;

That way, the libraries are included correctly. It does not matter if you have an older or newer version of OpenCV libraries with that compilation line, because it gets the correct linking every time given that pkg-config is correctly configured.

Change your make script to include pkg-config instead of hardocded libraries and it should work. 
If you need them in separate places, here it is:

This line will give you the includes:
&lt;code&gt;`pkg-config --cflags opencv`&lt;/code&gt;

This line will give you the libraries and their paths:
&lt;code&gt;`pkg-config --libs opencv`&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>OpenCV changed how to include its libraries. That is why -lcv is not found anymore, it was used in previous versions of OpenCV.</p>
<p>You have to change the make script for your code to make it compatible with this and newer versions of OpenCV.</p>
<p>You should always use pkg-config to make your programs instead of hard coding the libraries (I guess -lcv is hardcoded in your make script, or if not, then there may be other OpenCV installations)</p>
<p>For example, if you have a source code in the file MyFile.cpp and you are using OpenCV in it, you should compile it this way:</p>
<p><code>g++ `pkg-config --cflags --libs opencv` -o MyApp MyFile.cpp</code></p>
<p>That way, the libraries are included correctly. It does not matter if you have an older or newer version of OpenCV libraries with that compilation line, because it gets the correct linking every time given that pkg-config is correctly configured.</p>
<p>Change your make script to include pkg-config instead of hardocded libraries and it should work.<br />
If you need them in separate places, here it is:</p>
<p>This line will give you the includes:<br />
<code>`pkg-config --cflags opencv`</code></p>
<p>This line will give you the libraries and their paths:<br />
<code>`pkg-config --libs opencv`</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chinmay</title>
		<link>http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/comment-page-2/#comment-431</link>
		<dc:creator>Chinmay</dc:creator>
		<pubDate>Wed, 18 Jan 2012 10:01:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.samontab.com/web/?p=41#comment-431</guid>
		<description>Hi
I know its been a while since the last post on this thread, but still here goes.
I a trying to use OpenCV along with another piece of code (that I have not written). ffmpeg and boost libraries are also required which I have installed.
When I run the make script for the code, I get errors of the form
&quot;ld: -lcv not found&quot;

when I execute pkg-config --libs opencv I get the output
-L/usr/local/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann 

Could you please tell me what is going wrong?
I have been breaking my head over this for almost a week now.</description>
		<content:encoded><![CDATA[<p>Hi<br />
I know its been a while since the last post on this thread, but still here goes.<br />
I a trying to use OpenCV along with another piece of code (that I have not written). ffmpeg and boost libraries are also required which I have installed.<br />
When I run the make script for the code, I get errors of the form<br />
&#8220;ld: -lcv not found&#8221;</p>
<p>when I execute pkg-config &#8211;libs opencv I get the output<br />
-L/usr/local/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann </p>
<p>Could you please tell me what is going wrong?<br />
I have been breaking my head over this for almost a week now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: samontab</title>
		<link>http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/comment-page-2/#comment-369</link>
		<dc:creator>samontab</dc:creator>
		<pubDate>Tue, 15 Nov 2011 12:36:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.samontab.com/web/?p=41#comment-369</guid>
		<description>I do not use any compiler for Python. For C++ (OpenCV) I use gcc.</description>
		<content:encoded><![CDATA[<p>I do not use any compiler for Python. For C++ (OpenCV) I use gcc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/comment-page-2/#comment-368</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Tue, 15 Nov 2011 08:27:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.samontab.com/web/?p=41#comment-368</guid>
		<description>which compiler did you use for python and opencv?</description>
		<content:encoded><![CDATA[<p>which compiler did you use for python and opencv?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andres</title>
		<link>http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/comment-page-2/#comment-365</link>
		<dc:creator>andres</dc:creator>
		<pubDate>Mon, 14 Nov 2011 15:02:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.samontab.com/web/?p=41#comment-365</guid>
		<description>gracias me sirvio mucho, ahora estoy :) con opencv, me metere de lleno a programar</description>
		<content:encoded><![CDATA[<p>gracias me sirvio mucho, ahora estoy :) con opencv, me metere de lleno a programar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Helard</title>
		<link>http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/comment-page-2/#comment-360</link>
		<dc:creator>Helard</dc:creator>
		<pubDate>Thu, 27 Oct 2011 14:50:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.samontab.com/web/?p=41#comment-360</guid>
		<description>Hi,
Im getting an error with the reports for FFMPEG, when i run cmake . i got 0 for FFMPEG, How can i solve it? Please i really use some help
Thanks for your time</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Im getting an error with the reports for FFMPEG, when i run cmake . i got 0 for FFMPEG, How can i solve it? Please i really use some help<br />
Thanks for your time</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: samontab</title>
		<link>http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/comment-page-2/#comment-353</link>
		<dc:creator>samontab</dc:creator>
		<pubDate>Sun, 16 Oct 2011 20:01:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.samontab.com/web/?p=41#comment-353</guid>
		<description>Shazly, maybe you are running a different linux distro, or another version of Ubuntu because &lt;strong&gt;ldconfig&lt;/strong&gt; should be available in your path in Ubuntu, but in your case it isn&#039;t.

You can run it using the full path, for example:

&lt;code&gt;sudo /sbin/ldconfig&lt;/code&gt;

If that doesn&#039;t work, search where it is in your machine with one of these commands:

&lt;code&gt;whereis ldconfig&lt;/code&gt;
or
&lt;code&gt;locate ldconfig&lt;/code&gt;

Any of those codes should give you the correct location of &lt;strong&gt;ldconfig&lt;/strong&gt; in your machine. Replace &lt;strong&gt;/sbin/ldconfig&lt;/strong&gt; with the correct path and you should be good to go.</description>
		<content:encoded><![CDATA[<p>Shazly, maybe you are running a different linux distro, or another version of Ubuntu because <strong>ldconfig</strong> should be available in your path in Ubuntu, but in your case it isn&#8217;t.</p>
<p>You can run it using the full path, for example:</p>
<p><code>sudo /sbin/ldconfig</code></p>
<p>If that doesn&#8217;t work, search where it is in your machine with one of these commands:</p>
<p><code>whereis ldconfig</code><br />
or<br />
<code>locate ldconfig</code></p>
<p>Any of those codes should give you the correct location of <strong>ldconfig</strong> in your machine. Replace <strong>/sbin/ldconfig</strong> with the correct path and you should be good to go.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shazly</title>
		<link>http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/comment-page-2/#comment-352</link>
		<dc:creator>Shazly</dc:creator>
		<pubDate>Sun, 16 Oct 2011 18:31:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.samontab.com/web/?p=41#comment-352</guid>
		<description>thank you very much for this,
but i&#039;ve  a problem i wish you can help me solving it.
i have written my own program that uses cv.h and highgui.h program
but when i compile it i got huge errors like:
undefined reference to cvFree and somethings like that
i&#039;ve follow all your step but when i try sudo ldconfig it outputs command not found
and then i switch to root by su and try ldconfig i get no output

so if u can help me on that i will appreciate it</description>
		<content:encoded><![CDATA[<p>thank you very much for this,<br />
but i&#8217;ve  a problem i wish you can help me solving it.<br />
i have written my own program that uses cv.h and highgui.h program<br />
but when i compile it i got huge errors like:<br />
undefined reference to cvFree and somethings like that<br />
i&#8217;ve follow all your step but when i try sudo ldconfig it outputs command not found<br />
and then i switch to root by su and try ldconfig i get no output</p>
<p>so if u can help me on that i will appreciate it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: spanish</title>
		<link>http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/comment-page-2/#comment-347</link>
		<dc:creator>spanish</dc:creator>
		<pubDate>Wed, 12 Oct 2011 11:05:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.samontab.com/web/?p=41#comment-347</guid>
		<description>This is fantastic blog.
Thank you, I successfully installed OpenCV 2.1 :-D</description>
		<content:encoded><![CDATA[<p>This is fantastic blog.<br />
Thank you, I successfully installed OpenCV 2.1 :-D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erin</title>
		<link>http://www.samontab.com/web/2010/04/installing-opencv-2-1-in-ubuntu/comment-page-2/#comment-333</link>
		<dc:creator>Erin</dc:creator>
		<pubDate>Tue, 27 Sep 2011 03:38:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.samontab.com/web/?p=41#comment-333</guid>
		<description>ur tutorial is great!! I tried a lot of other methods, which can not work. This is really helpful.. Thanks a lot</description>
		<content:encoded><![CDATA[<p>ur tutorial is great!! I tried a lot of other methods, which can not work. This is really helpful.. Thanks a lot</p>
]]></content:encoded>
	</item>
</channel>
</rss>

