I am trying to use openCV 2.2 new Qt features (see http://opencv.willowgarage.com/documentation/cpp/qt_new_functions.html#index-1384 ) for the project, but I keep getting the error:
1> main.cpp 1> main.obj: LNK2019 error: unresolved external character "void __cdecl resume :: displayStatusBar (class class :: basic_string, class std :: allocator> const &, class standard :: basic_string, class std :: allocator> const &, int) "(? DisplayStatusBar @ resume @@ YAXABV? $ Basic_string @DU? $ Char_traits @D @ stand @@ V? $ Distributor @D @ 2 @@ stand @@ 0H @Z) link in function _main 1> C: \ Documents and Settings \ Orange \ my documents \ visual studio 2010 \ Projects \ FYP \ FYP.exe: fatal error LNK1120: 1 unresolved external
I am using Visual Studio 2010, windows xp, qt 4.7.1 and openCV 2.2.
I already added the main lib files for openCV and qt in my project settings in properties> Component> Input. I tried compiling and running openCV code without any problems, except when I tried to use new Qt features like displayStatusBar (...) and createButton (...). I was looking for a solution for a couple of days, and I still could not find it, perhaps because openCV2.2 was only recently released. Has anyone tried and encountered this problem and got a solution?
By the way, I want to use the functions provided by openCV to create simple windows and buttons instead of qt, because I want to avoid converting between the Mat data type in openCV and QImage in Qt.
Thanks for any answers.
Attached Code:
#include <cv.h>
#include <highgui.h>
using namespace cv;
int main()
{
namedWindow("Test", CV_WINDOW_AUTOSIZE);
displayStatusBar("Test", "Hello World", 5000);
return 0;
}