OK, spent some time studying cmake, checked through the configurations, can't see anything obviously wrong, and followed the suggested -D during configuration of depthai-core-example/depthai-core/build and depthai-core-example/build
I'm seeing exactly the same error, even though the build reports the OpenCV and required libraries being found and OpenCV Support enabled successfully being built (see output below).
However, cloning and building the original depthai-core-example/ works perfectly fine (but obviously limited to using the back level example code)
To me it looks as though there's still something mis-aligned after the git checkout etc steps. I've followed all of the suggestions. Any ideas or hints would be greatly appreciated. Thanks.
Here's the detailed output...
Configuration of depthai-core-example/depthai-core/ build
cmake .. -D OpenCV_DIR=/home/mike/dev/libs
-- [hunter] Calculating Toolchain-SHA1
-- [hunter] Calculating Config-SHA1
-- [hunter] HUNTER_ROOT: /home/mike/.hunter
-- [hunter] [ Hunter-ID: 062a19a | Toolchain-ID: 64dcd41 | Config-ID: f3a139e ]
-- [hunter] NLOHMANN_JSON_ROOT: /home/mike/.hunter/Base/062a19a/64dcd41/f3a139e/Install (ver.: 3.9.1)
-- [hunter] XLINK_ROOT: /home/mike/.hunter/Base/062a19a/64dcd41/f3a139e/Install (ver.: luxonis-2021.3-master)
-- [hunter] BZIP2_ROOT: /home/mike/.hunter/Base/062a19a/64dcd41/f3a139e/Install (ver.: 1.0.8-p0)
-- [hunter] FP16_ROOT: /home/mike/.hunter/Base/062a19a/64dcd41/f3a139e/Install (ver.: luxonis-0.0.0)
-- [hunter] LIBARCHIVE-LUXONIS_ROOT: /home/mike/.hunter/Base/062a19a/64dcd41/f3a139e/Install (ver.: 3.4.2-p2)
-- [hunter] SPDLOG_ROOT: /home/mike/.hunter/Base/062a19a/64dcd41/f3a139e/Install (ver.: 1.8.2)
-- Performing Test FLAG-Wformat=2
-- Performing Test FLAG-Wformat=2 - Success
-- Performing Test FLAG-Werror=self-assign-field
-- Performing Test FLAG-Werror=self-assign-field - Failed
-- Performing Test FLAG-Werror=unused-lambda-capture
-- Performing Test FLAG-Werror=unused-lambda-capture - Failed
-- Performing Test FLAG-Werror=return-type
-- Performing Test FLAG-Werror=return-type - Success
-- Performing Test FLAG-Werror=non-virtual-dtor
-- Performing Test FLAG-Werror=non-virtual-dtor - Success
-- Performing Test FLAG-Werror=sign-compare
-- Performing Test FLAG-Werror=sign-compare - Success
-- Performing Test FLAG-Werror=reorder
-- Performing Test FLAG-Werror=reorder - Success
-- Performing Test FLAG-Werror=switch-enum
-- Performing Test FLAG-Werror=switch-enum - Success
-- Compiling depthai-core resources in PATCH_ONLY mode
-- Downloading Depthai device side binaries from server...
-- Downloading depthai and patch
-- commit: 2bd2bb926ceb9f52969ab42f64689e79d067b311
-- File already downloaded (resources): depthai-shared-commit-hash-7131affa2c01ecd34506e9c3dd8ea9198ed874f1.txt
-- depthai-shared between device and host MATCH!. (device: 2bd2bb926ceb9f52969ab42f64689e79d067b311, host: 2bd2bb926ceb9f52969ab42f64689e79d067b311
-- Downloading and checking depthai-device-fwp.tar.xz
-- File already downloaded (resources): depthai-device-fwp-7131affa2c01ecd34506e9c3dd8ea9198ed874f1.tar.xz
-- Downloading depthai bootloader
-- folder: /home/mike/oak/depthai-core-example/depthai-core/build/resources
-- maturity: release
-- commit_version_arg: 0.0.12
-- bootloader shared commit: 7efb3e188715844d7b2b0e50861e4bfc36087370
-- File already downloaded (resources): depthai-bootloader-shared-commit-hash-0.0.12.txt
-- depthai-bootloader-shared between device and host MATCH!. (device: 7efb3e188715844d7b2b0e50861e4bfc36087370, host: 7efb3e188715844d7b2b0e50861e4bfc36087370
-- Downloading and checking depthai-bootloader-fwp.tar.xz
-- File already downloaded (resources): depthai-bootloader-fwp-0.0.12.tar.xz
-- LIST OF RESOURCE COMPILED FILES: /home/mike/oak/depthai-core-example/depthai-core/build/resources/depthai-device-fwp-7131affa2c01ecd34506e9c3dd8ea9198ed874f1.tar.xz;/home/mike/oak/depthai-core-example/depthai-core/build/resources/depthai-bootloader-fwp-0.0.12.tar.xz
-- ClangFormat: clang-format not found! Target 'clangformat' not available...
-- ClangFormat: clang-format not found! Target 'clangformat' not available...
-- OpenCV and required libraries (opencv_core;opencv_imgproc) found. OpenCV Support enabled
-- BUILD_DATETIME: 2021-08-27 23:40:14 +0000, BUILD_COMMIT: 57bb84ad209825f181744f2308b8ac6f52a37604, BUILD_COMMIT_DATETIME: 2021-08-24 18:49:14 +0300
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mike/oak/depthai-core-example/depthai-core/build
Build of depthai-core-example/depthai-core
cmake --build .
[ 10%] Built target depthai-resources
Scanning dependencies of target depthai-core
[ 12%] Building CXX object CMakeFiles/depthai-core.dir/src/utility/Initialization.cpp.o
[ 14%] Linking CXX static library libdepthai-core.a
[ 96%] Built target depthai-core
[100%] Built target depthai-opencv
**Configuration of depthai-core-example/build **
cd ../../build
cmake .. -D OpenCV_DIR=/home/mike/dev/libs
-- Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.
-- [hunter] Calculating Toolchain-SHA1
-- [hunter] Calculating Config-SHA1
-- [hunter] HUNTER_ROOT: /home/mike/.hunter
-- [hunter] [ Hunter-ID: 062a19a | Toolchain-ID: 64dcd41 | Config-ID: f3a139e ]
-- [hunter] NLOHMANN_JSON_ROOT: /home/mike/.hunter/Base/062a19a/64dcd41/f3a139e/Install (ver.: 3.9.1)
-- [hunter] XLINK_ROOT: /home/mike/.hunter/Base/062a19a/64dcd41/f3a139e/Install (ver.: luxonis-2021.3-master)
-- [hunter] BZIP2_ROOT: /home/mike/.hunter/Base/062a19a/64dcd41/f3a139e/Install (ver.: 1.0.8-p0)
-- [hunter] FP16_ROOT: /home/mike/.hunter/Base/062a19a/64dcd41/f3a139e/Install (ver.: luxonis-0.0.0)
-- [hunter] LIBARCHIVE-LUXONIS_ROOT: /home/mike/.hunter/Base/062a19a/64dcd41/f3a139e/Install (ver.: 3.4.2-p2)
-- [hunter] SPDLOG_ROOT: /home/mike/.hunter/Base/062a19a/64dcd41/f3a139e/Install (ver.: 1.8.2)
-- Performing Test FLAG-Wformat=2
-- Performing Test FLAG-Wformat=2 - Success
-- Performing Test FLAG-Werror=self-assign-field
-- Performing Test FLAG-Werror=self-assign-field - Failed
-- Performing Test FLAG-Werror=unused-lambda-capture
-- Performing Test FLAG-Werror=unused-lambda-capture - Failed
-- Performing Test FLAG-Werror=return-type
-- Performing Test FLAG-Werror=return-type - Success
-- Performing Test FLAG-Werror=non-virtual-dtor
-- Performing Test FLAG-Werror=non-virtual-dtor - Success
-- Performing Test FLAG-Werror=sign-compare
-- Performing Test FLAG-Werror=sign-compare - Success
-- Performing Test FLAG-Werror=reorder
-- Performing Test FLAG-Werror=reorder - Success
-- Performing Test FLAG-Werror=switch-enum
-- Performing Test FLAG-Werror=switch-enum - Success
-- Compiling depthai-core resources in PATCH_ONLY mode
-- Downloading Depthai device side binaries from server...
-- Downloading depthai and patch
-- commit: 2bd2bb926ceb9f52969ab42f64689e79d067b311
-- File already downloaded (resources): depthai-shared-commit-hash-7131affa2c01ecd34506e9c3dd8ea9198ed874f1.txt
-- depthai-shared between device and host MATCH!. (device: 2bd2bb926ceb9f52969ab42f64689e79d067b311, host: 2bd2bb926ceb9f52969ab42f64689e79d067b311
-- Downloading and checking depthai-device-fwp.tar.xz
-- File already downloaded (resources): depthai-device-fwp-7131affa2c01ecd34506e9c3dd8ea9198ed874f1.tar.xz
-- Downloading depthai bootloader
-- folder: /home/mike/oak/depthai-core-example/depthai-core/resources
-- maturity: release
-- commit_version_arg: 0.0.12
-- bootloader shared commit: 7efb3e188715844d7b2b0e50861e4bfc36087370
-- File already downloaded (resources): depthai-bootloader-shared-commit-hash-0.0.12.txt
-- depthai-bootloader-shared between device and host MATCH!. (device: 7efb3e188715844d7b2b0e50861e4bfc36087370, host: 7efb3e188715844d7b2b0e50861e4bfc36087370
-- Downloading and checking depthai-bootloader-fwp.tar.xz
-- File already downloaded (resources): depthai-bootloader-fwp-0.0.12.tar.xz
-- LIST OF RESOURCE COMPILED FILES: /home/mike/oak/depthai-core-example/depthai-core/resources/depthai-device-fwp-7131affa2c01ecd34506e9c3dd8ea9198ed874f1.tar.xz;/home/mike/oak/depthai-core-example/depthai-core/resources/depthai-bootloader-fwp-0.0.12.tar.xz
-- ClangFormat: clang-format not found! Target 'clangformat' not available...
-- ClangFormat: clang-format not found! Target 'clangformat' not available...
-- OpenCV and required libraries (opencv_core;opencv_imgproc) found. OpenCV Support enabled
-- BUILD_DATETIME: 2021-08-28 00:09:44 +0000, BUILD_COMMIT: 57bb84ad209825f181744f2308b8ac6f52a37604, BUILD_COMMIT_DATETIME: 2021-08-24 18:49:14 +0300
-- Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mike/oak/depthai-core-example
Build step
cmake --build .
[ 10%] Built target depthai-resources
Scanning dependencies of target depthai-core
[ 12%] Building CXX object depthai-core/CMakeFiles/depthai-core.dir/src/utility/Initialization.cpp.o
[ 14%] Linking CXX static library libdepthai-core.a
[ 96%] Built target depthai-core
[ 98%] Building CXX object CMakeFiles/myapp.dir/src/main.cpp.o
/home/mike/oak/depthai-core-example/src/main.cpp: In function ‘int main()’:
/home/mike/oak/depthai-core-example/src/main.cpp:47:9: error: ‘cv’ has not been declared
47 | cv::imshow("rgb", inRgb->getCvFrame());
| ~
/home/mike/oak/depthai-core-example/src/main.cpp:49:19: error: ‘cv’ has not been declared
49 | int key = cv::waitKey(1);
| ~
In file included from /home/mike/oak/depthai-core-example/depthai-core/include/depthai/pipeline/datatype/ImageManipConfig.hpp:8,
from /home/mike/oak/depthai-core-example/depthai-core/include/depthai/pipeline/node/ImageManip.hpp:4,
from /home/mike/oak/depthai-core-example/depthai-core/include/depthai/pipeline/nodes.hpp:9,
from /home/mike/oak/depthai-core-example/depthai-core/include/depthai/depthai.hpp:17,
from /home/mike/oak/depthai-core-example/src/main.cpp:4:
/home/mike/oak/depthai-core-example/depthai-core/include/depthai/pipeline/datatype/ImgFrame.hpp: In instantiation of ‘void dai::ImgFrame::getCvFrame(T ...) [with T = {}]’:
/home/mike/oak/depthai-core-example/src/main.cpp:47:45: required from here
/home/mike/oak/depthai-core-example/depthai-core/include/depthai/pipeline/datatype/ImgFrame.hpp:178:46: error: static assertion failed: Library not configured with OpenCV support
178 | static_assert(dependent_false<T...>::value, "Library not configured with OpenCV support");
| ~~~~
make[2]: *** [CMakeFiles/myapp.dir/build.make:63: CMakeFiles/myapp.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:128: CMakeFiles/myapp.dir/all] Error 2
make: *** [Makefile:130: all] Error 2