Note that there are some explanatory texts on larger screens.

plurals
  1. POopenCV 2.2 createButton LNK 2019 error in Visual Studio 2010
    text
    copied!<p>I've been trying to use openCV 2.2's new Qt functions (See <a href="http://opencv.willowgarage.com/documentation/cpp/qt_new_functions.html#index-1384" rel="nofollow">http://opencv.willowgarage.com/documentation/cpp/qt_new_functions.html#index-1384</a>) for a project but I keep getting the error: </p> <blockquote> <p>1> main.cpp 1>main.obj : error LNK2019: unresolved external symbol "void __cdecl cv::displayStatusBar(class std::basic_string,class std::allocator > const &amp;,class std::basic_string,class std::allocator > const &amp;,int)" (?displayStatusBar@cv@@YAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0H@Z) referenced in function _main 1>C:\Documents and Settings\Orange\my documents\visual studio 2010\Projects\FYP\FYP.exe : fatal error LNK1120: 1 unresolved externals</p> </blockquote> <p>I'm using Visual Studio 2010, windows xp, qt 4.7.1 and openCV 2.2.<br> I have already added the core lib files for both openCV and qt in my project settings under properties>Linker>Input. I have tried compiling and running openCV code without experiencing any problem except when I tried to use the new Qt functions such as displayStatusBar(...) and createButton(...). I've been searching for a solution for a couple of days now and I still could not find one possibly because openCV2.2 was released only recently. Has anyone tried and encountered this problem and have a solution? </p> <p>Btw the reason I want to use the openCV provided functions for creating simple windows and buttons instead of qt is because I wish to avoid having to convert between the Mat data type in openCV and QImage in Qt.</p> <p>Thanks in advance to any replies.</p> <p>Attached code:</p> <pre><code>#include &lt;cv.h&gt; #include &lt;highgui.h&gt; using namespace cv; int main() { namedWindow("Test", CV_WINDOW_AUTOSIZE); // ... // Code links without problem when the following line is commented out. displayStatusBar("Test", "Hello World", 5000); return 0; } </code></pre>
 

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