深度センサー(PMD Camboard)を操作し、キャプチャされた深度画像をライブストリームとして表示しようとしています。私はちょうど良いセンサーからのデータを得ることができます。問題は、OpenCVの部品を入れようとするとすぐに始まります。個別には完全に動作しますが、問題を統合しようとするとすぐに問題が発生します。 Webcamのフィードを表示する単純なプログラムをコンパイルしようとしても、depthsensorのものがなくても、私は同じエラーが発生するので、CMakeLists.txtにエラーがあると思います。このプログラムは、openCV用のCMakeだけでコンパイルしようとすると動作します。OpenCV Qtコンパイル中に未定義の参照エラーが発生しました
EDIT:私は正確にエラーをトリガどの部分を参照するためにCMakeの体系の無効部分を試み、線ことが判明:
link_directories(${royale_LIB_DIR})
はエラーの原因となっているものです。
私がコンパイルしようとすると、私は次のエラーを取得:http://pastebin.com/KLKtzzSn
で全エラー
/usr/local/lib/libopencv_highgui.so.3.1.0: undefined reference to `QWidget::isFullScreen() [email protected]_5'
/usr/local/lib/libopencv_cvv.so.3.1.0: undefined reference to `QAbstractSlider::setMinimum(int)@Qt_5'
/usr/local/lib/libopencv_highgui.so.3.1.0: undefined reference to `non-virtual thunk to QBoxLayout::minimumSize() [email protected]_5'
/usr/lib64/libQt5OpenGL.so.5: undefined reference to `QTransform::type() [email protected]_5'
/usr/local/lib/libopencv_cvv.so.3.1.0: undefined reference to `QWidget::hasHeightForWidth() [email protected]_5'
/usr/lib64/libQt5OpenGL.so.5: undefined reference to `QPen::color() [email protected]_5'
/usr/local/lib/libopencv_cvv.so.3.1.0: undefined reference to `QFrame::changeEvent(QEvent*)@Qt_5'
/usr/lib64/libQt5OpenGL.so.5: undefined reference to `QOpenGLMultiGroupSharedResource::insert(QOpenGLContext*, QOpenGLSharedResource*)@Qt_5_PRIVATE_API'
/usr/lib64/libQt5OpenGL.so.5: undefined reference to `QPaintDevice::~QPaintDevice()@Qt_5'
/usr/local/lib/libopencv_cvv.so.3.1.0: undefined reference to `QObject::QObject(QObject*)@Qt_5'
/usr/local/lib/libopencv_cvv.so.3.1.0: undefined reference to `QTabWidget::metaObject() [email protected]_5'
/usr/local/lib/libopencv_cvv.so.3.1.0: undefined reference to `QColorDialog::QColorDialog(QWidget*)@Qt_5'
/usr/local/lib/libopencv_highgui.so.3.1.0: undefined reference to `QFutureInterfaceBase::setThreadPool(QThreadPool*)@Qt_5'
/usr/lib64/libQt5OpenGL.so.5: undefined reference to
そして、次のように私のCMakeLists.txtは次のとおりです。
cmake_minimum_required(VERSION 2.8)
set(CMAKE_PREFIX_PATH "share")
#project (depthDataCallBack)
project (webStream)
find_package(OpenCV REQUIRED)
find_package(royale REQUIRED)
link_directories(${royale_LIB_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc)
add_executable(webStream webStream.cpp)
target_link_libraries(webStream ${OpenCV_LIBS})
target_link_libraries(webStream "${royale_LIBS}")
私は新たなんです唯一のrecently correctedを持っていたCMakeに。どんな助けもありがとう。