I installed "opencv" with "synaptic". when I(my os is ubuntu 12.04 32bit)
.pro:
QT += core gui
TARGET = opencv_test1
TEMPLATE = app
SOURCES += main.cpp\
widget.cpp
HEADERS += widget.h
FORMS += widget.ui
main.cpp:
#include <QtGui/QApplication>
#include "widget.h"
#include "opencv2/opencv.hpp"
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Widget w;
w.show();
//---------------------------------------------------------------
IplImage* img= cvLoadImage("/home/mrl-x200/Desktop/IR_0007.jpg");
//cvNamedWindow("hi",CV_WINDOW_AUTOSIZE);
//cvShowImage("hi",img);
//---------------------------------------------------------------
return a.exec();
}
when i ran it gave me this error:
error: undefined reference to `cvLoadImage'
error: collect2: ld returned 1 exit status
what am I should to do? thank you