Note that there are some explanatory texts on larger screens.

plurals
  1. POUndefined Opencv References when using Qt + Opencv
    text
    copied!<p>Hello im basically trying to make an application that shows and Opencv Iplimage converted to QImage in a label, i did a simple example and it worked just fine, but now when i try to integrate that image convertion to another project,i get undefined Opencv functions references like this: undefined reference to `cvQueryFrame'all from the Highgui </p> <p>Im actually using the same library paths i used when i first tried that image convertion, just that this time its not working. Im quite new with Qt, and i dont know where the problem might be:</p> <pre><code> #include &lt;qt4/QtGui/QApplication&gt; #include "myqtapp.h" #include &lt;iostream&gt; #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #include &lt;opencv/highgui.h&gt; #include &lt;opencv/cv.h&gt; using namespace std; int main(int argc, char *argv[]) { QApplication app(argc, argv); myQtApp *dialog = new myQtApp; //******************************************************************************************************** QImage myImage; QLabel label_5; IplImage* frame; //label_5 = new QLabel(myQtAppDLG); //Not using this Yet CvCapture* capture = cvCreateFileCapture( "garden.bmp" ); frame = cvQueryFrame( capture ); cvCvtColor(frame,frame,CV_BGR2RGB); myImage = QImage((unsigned char *)frame-&gt;imageDataOrigin,frame-&gt;width,frame-&gt;height,QImage::Format_RGB888); //label_5.setPixmap(QPixmap::fromImage(myImage)); //Not using this Yet //******************************************************************************************************** dialog-&gt;show(); return app.exec(); </code></pre> <p>}</p> <pre><code> main.cpp:(.text+0x44): undefined reference to `cvCreateFileCapture' main.cpp:(.text+0x4c): undefined reference to `cvQueryFrame' main.cpp:(.text+0x62): undefined reference to `cvCvtColor' </code></pre> <p>As you see the first thing i try to do is just to use some Opencv Functions like CvQueryFrame, the funny thing is that im using the exact same include paths i used the first time, also linked the exact same dynamic libraries. I've tried different paths and compiler but nothing seems to work, i dont know where the error might be. Im using Linux Ubuntu and Netbeans C++, Any hint?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload