我在OpenCV庫中包含Qt Creator時遇到了問題。Qt Creator中的OpenCV錯誤
這裏我的代碼:
INCLUDEPATH += "C:/OpenCV/opencv/build/include" \
CONFIG(debug,debug|release) {
LIBS += -L"C:/OpenCV/opencv/build/x86/vc12/lib" \
-lopencv_core2413d \
-lopencv_calib3d2413d \
-lopencv_contrib2413d \
-lopencv_features2d2413d \
-lopencv_flann2413d \
-lopencv_gpu2413d \
-lopencv_highgui2413d \
-lopencv_imgproc2413d \
-lopencv_videostab2413d
}
CONFIG(debug,debug|release) {
DEFINES += QT_NO_WARNING_OUTPUT QT_NO_DEBUG_OUTPUT
LIBS += -L"C:/OptiNavCV/opencv/build/x86/vc12/lib" \
-lopencv_core2413 \
-lopencv_calib3d2413 \
-lopencv_contrib2413 \
-lopencv_features2d2413 \
-lopencv_flann2413 \
-lopencv_gpu2413 \
-lopencv_highgui2413 \
-lopencv_imgproc2413 \
-lopencv_videostab2413
}
}
錯誤: C:\ Qt的\ Qt5.5.1 \工具\ QtCreator \ BIN \ jom.exe -f Makefile.Release CL -c - nologo -Zc:wchar_t -FS -O2 -MD -Zc:strictStrings -GR -W3 -w34100 -w34189 -w44996 -EHsc -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG -I .. \ TestAppQt - 一世。 -I ........ \ OptiNavCV \ opencv \ build \ include -I ........ \ Qt \ Qt5.5.1 \ 5.5 \ msvc2013_64 \ include -I ........ \ Qt \ Qt5.5.1 \ 5.5 \ msvc2013_64 \ include \ QtWidgets -I ........ \ Qt \ Qt5.5.1 \ 5.5 \ msvc2013_64 \ include \ QtGui -I ........ \ Qt \ Qt5.5.1 \ 5.5 \ msvc2013_64 \ include \ QtANGLE -I ........ \ Qt \ Qt5.5.1 \ 5.5 \ msvc2013_64 \ include \ QtCore -Irelease -I。 -I ........ \ Qt \ Qt5.5.1 \ 5.5 \ msvc2013_64 \ mkspecs \ win32-msvc2013 -Forelease \ @C:\ Users \ szymo \ AppData \ Local \ Temp \ mainwindow.obj.11752.15.jom mainwindow.cpp link/NOLOGO/DYNAMICBASE/NXCOMPAT/INCREMENTAL:NO/SUBSYSTEM:WINDOWS「/ MANIFESTDEPENDENCY:type ='win32'name ='Microsoft.Windows.Common-Controls'version ='6.0.0.0'publicKeyToken =' 6595b64144ccf1df'language =''processorArchitecture =''「/ MANIFEST:embed /OUT:release\TestAppQt.exe @C:\ Users \ szymo \ AppData \ Local \ Temp \ TestAppQt.exe.11752.1422.jom mainwindow.obj :錯誤LNK2019:函數「public:__cdecl MainWindow :: MainWindow(class QWidget *)」中引用的無法解析的外部符號「void __cdecl cv :: fastFree(void *)」(?fastFree @ cv @@ YAXPEAX @ Z) 0MainWindow @@ QEAA @ PEAVQWidget @@@ Z) mainwindow.obj:錯誤LNK2019:無法解析的外部符號「public:__cdecl在函數「public:__cdecl MainWindow :: MainWindow(class QWidget *)中引用的cv :: _ InputArray :: _ InputArray(class cv :: Mat const &)」(?? 0_InputArray @ cv @@ QEAA @ AEBVMat @ 1 @@ Z) 「(?0MainWindow @@ QEAA @ PEAVQWidget @@@ Z) mainwindow.obj:error LNK2019:無法解析的外部符號」public:void __cdecl cv :: Mat :: deallocate(void)「(?deallocate @ Mat @ cv @ (_QcAcclc)在函數「public:__cdecl MainWindow :: MainWindow(class QWidget *)」中引用 mainwindow.obj:error LNK2019:無法解析的外部符號「int __cdecl cv: :_interfaceedExchangeAdd(int *,int)「(?_interlockedExchangeAdd @ cv @@ YAHPEAHH @ Z)在函數」public:__cdecl MainWindow :: MainWindow(class QWidget *)「中引用(?? 0MainWindow @@ QEAA @ PEAVQWidget @@@ Z ) mainwindow.obj:錯誤LNK2019:無法解析的外部符號「void __cdecl cv :: imshow(class std :: basic_string,class std :: allocator> const?&,class cv :: _ InputArray const &)「(?imshow @ cv @@ YAXAEBV?$ basic_string @ DU?$ char_traits @ D @ std @@ V?$ allocator @ D @ 2 @@ std @@ AEBV_InputArray @ 1 @Window.obj:error LNK2019:無法解析的外部符號「class cv:@@ Z) :Mat __cdecl cv :: imread(class std :: basic_string,class std :: allocator> const &,int)「(?imread @ cv @@ YA?AVMat @ 1 @ AEBV?$ basic_string @ DU?$ char_traits @ D (@ 0); @ std @@ V $ $ allocator @ D @ 2 @@ std @@ H @ Z)在函數「public:__cdecl MainWindow :: MainWindow(class QWidget *)」中引用(?? 0MainWindow @@ QEAA @ PEAVQWidget @@@ Z) release \ TestAppQt.exe:致命錯誤LNK1120:6個未解析的外部程序 jom:C:\ Users \ szymo \ Documents \ build-TestAppQt-Desktop_Qt_5_5_1_MSVC2013_64bit-Release \ Makefile.Release [release \ TestAppQt.exe] Error 1120 jom:C:\ Users \ szymo \ Documents \ build-TestAppQt-Desktop_Qt_5_5_1_MSVC2013_64bit-Release \ Makefile [release]錯誤2 09:52:59:進程「C:\ Qt \ Qt5。 5.1 \ Tools \ QtCreator \ bin \ jom.exe「退出,代碼爲2. 構建/部署項目TestAppQt時出錯(套件:Desktop Qt 5.5。1和MSVC2013 64位) 當執行步驟 「使」
我該如何改變它? – Szymon
看這裏:http://stackoverflow.com/questions/4383475/using-qmake-to-build-a-both-32-and-64-bits-versions-of-project –