Open jcnwholland opened 3 years ago
OpenCV is not detected as expected. It sounds that you either didn't install OpenCV or set OpenCV_DIR
env var properly.
During OpenCV build and install, check if you run instructions on point 2
cmake --build . --config Release --target install -j4
and that you have includes and libraries in %VISP_WS%\opencv-4.5.2\build
Open the "Edit environment variable" UI and check that you have OpenCV_DIR
env var set to %VISP_WS%\opencv-4.5.2\build
An other check would be to see the content of ViSP-third-party.txt. Here you should see a line like:
Use OpenCV: yes (ver 4.5.2)
Hi,
I'm unable to get visp build, keep getting the same error. Did a clean build of opencv in %VISP_WS%\opencv-x.y.z\ , successful. Cmake giving not errors while configuring. Followed steps as on https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-install-win10-mingw64.html. Windows 10 OS, CMake 3.20.3, opencv 4.5.2.
C:\visp-ws\visp\3rdparty\pthreads4w\dll.c:143:55: warning: 'gcc_ctor' initialized and declared 'extern' __attribute__((section(".ctors"), used)) extern int (*gcc_ctor)(void) = __ptw32_on_process_init; ^~~~~~~~ C:\visp-ws\visp\3rdparty\pthreads4w\dll.c:144:55: warning: 'gcc_dtor' initialized and declared 'extern' __attribute__((section(".dtors"), used)) extern int (*gcc_dtor)(void) = __ptw32_on_process_exit;
then at 24%:
[ 24%] Linking CXX shared library ..\..\x64\mingw\bin\libvisp_core341.dll CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xc8f): undefined reference to
cv::noArray()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xd0d): undefined reference tocv::Mat::zeros(int, int, int)' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xd20): undefined reference to
cv::_InputArray::_InputArray(cv::MatExpr const&)' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xd41): undefined reference tocv::Mat::eye(int, int, int)' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xd54): undefined reference to
cv::_InputArray::_InputArray(cv::MatExpr const&)' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xdb6): undefined reference tocv::projectPoints(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, double)' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xdc2): undefined reference to
cv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xdcb): undefined reference tocv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xdd4): undefined reference to
cv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xde0): undefined reference tocv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xde9): undefined reference to
cv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xdf2): more undefined references tocv::Mat::~Mat()' follow CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xf0d): undefined reference to
cv::Mat::zeros(int, int, int)' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xf15): undefined reference tocv::Mat::Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xf3b): undefined reference to
cv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xf44): undefined reference tocv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xf4d): undefined reference to
cv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0xfd7): undefined reference tocv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x101e): undefined reference to
cv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x1039): more undefined references tocv::Mat::~Mat()' follow CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x10cd): undefined reference to
cv::Mat::zeros(int, int, int)' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x10d5): undefined reference tocv::Mat::Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x10fb): undefined reference to
cv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x1104): undefined reference tocv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x110d): undefined reference to
cv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x1197): undefined reference tocv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x11de): undefined reference to
cv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x11f9): more undefined references tocv::Mat::~Mat()' follow CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x1284): undefined reference to
cv::Mat::zeros(int, int, int)' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x128c): undefined reference tocv::Mat::Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x12b2): undefined reference to
cv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x12bb): undefined reference tocv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x12c4): undefined reference to
cv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x133f): undefined reference tocv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x136f): undefined reference to
cv::Mat::~Mat()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x138a): more undefined references tocv::Mat::~Mat()' follow CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x1415): undefined reference to
cv::noArray()' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x1493): undefined reference tocv::Mat::zeros(int, int, int)' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x14a6): undefined reference to
cv::_InputArray::_InputArray(cv::MatExpr const&)' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x14c7): undefined reference tocv::Mat::eye(int, int, int)' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x14da): undefined reference to
cv::_InputArray::_InputArray(cv::MatExpr const&)' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x153c): undefined reference tocv::projectPoints(cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, double)' CMakeFiles\visp_core.dir/objects.a(vpMeterPixelConversion.cpp.obj):vpMeterPixelConversion.cpp:(.text+0x1548): undefined
ect
end: collect2.exe: error: ld returned 1 exit status mingw32-make[2]: [modules\core\CMakeFiles\visp_core.dir\build.make:1793: x64/mingw/bin/libvisp_core341.dll] Error 1 mingw32-make[1]: [CMakeFiles\Makefile2:4786: modules/core/CMakeFiles/visp_core.dir/all] Error 2 mingw32-make: *** [Makefile:145: all] Error 2
Anyone a suggestion what i'm doing wrong? thxn