私はプロジェクトのために(http://opencv.willowgarage.com/documentation/cpp/qt_new_functions.html#index-1384を参照)のOpenCV 2.2の新しいQtの機能を使用しようとしてきたが、私はエラーを取得しておいてください。OpenCVの2.2 createButton LNK 2019エラー2010
1> main.cpp 1>main.obj : error LNK2019: unresolved external symbol "void __cdecl cv::displayStatusBar(class std::basic_string,class std::allocator > const &,class std::basic_string,class std::allocator > const &,int)" ([email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]) 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
私は」 Visual Studio 2010、windows xp、qt 4.7.1、およびopenCV 2.2を使用しています。
プロジェクトの設定で、プロパティ>リンカ>入力のopenCVとqtの両方のコアlibファイルをすでに追加しました。私は、displayStatusBar(...)やcreateButton(...)のような新しいQt関数を使用しようとした時以外は何の問題もなく、openCVコードのコンパイルと実行を試みました。私は数日間の解決策を探していましたが、openCV2.2が最近リリースされただけなので、まだ見つけられませんでした。誰もがこの問題を試して遭遇し、解決策を持っていますか?
Btw openCVのMatデータタイプとQtのQImageの間の変換を避けたいので、qtの代わりに単純なウィンドウとボタンを作成するためにopenCVが提供する関数を使用したい理由があります。すべての回答に事前に
感謝。
付属コード:
#include <cv.h>
#include <highgui.h>
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;
}
これを共有いただきありがとうございます! – Sharpie
本当に便利です...同じ場所にこだわってました – sg88
私は同じエラーがありますが、関数createTrackbarは機能します。それもあなたのために働いたのですか?覚えていますか?ありがとう! – mrcaramori