So far I needed these lines to compile

include_directories(../../../../depthai-core/include)

include_directories(../../../../depthai-core/shared/depthai-shared/include )

include_directories(~/.hunter/_Base/16cc954/a3a48bb/624857f/Install/include)

include_directories(../../../../depthai-core/shared/depthai-shared/3rdparty)

include_directories(../../../../depthai-core/shared/depthai-bootloader-shared/include)

And now I need openCV. Can you tell me how to integrate without openCV?

I have built my code integrating depthai with above. Can you tell me if my understanding is correct?

If I build depthai with option to build the examples, then my integration of depthai-core will require opencv?

but if I build depthai without examples, then I wont need opencv when integrating.

Thank you

    I can compile but I cant link. Here is the error

    usr/bin/ld: /home/tony/.hunter/_Base/16cc954/a3a48bb/624857f/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_X86_64_TPOFF32 against `_ZGVZN6spdlog7details2os9thread_idEvE3tid' can not be used when making a shared object; recompile with -fPIC

    /usr/bin/ld: /home/tony/.hunter/_Base/16cc954/a3a48bb/624857f/Install/lib/libXLink.a(PlatformDeviceFd.cpp.o): relocation R_X86_64_PC32 against symbol `_ZNSt13unordered_mapImPvSt4hashImESt8equal_toImESaISt4pairIKmS0_EEED1Ev' can not be used when making a shared object; recompile with -fPIC

    /usr/bin/ld: final link failed: bad value

    collect2: error: ld returned 1 exit status

    make[2]: *** [libs/tdcu/src/CMakeFiles/tdcu.dir/build.make:838: libs/tdcu/src/libtdcu.so] Error 1

    make[1]: *** [CMakeFiles/Makefile2:11198: libs/tdcu/src/CMakeFiles/tdcu.dir/all] Error 2

    make: *** [Makefile:166: all] Error 2

    maybe this is SHARED_LIBS_ON

    Same error building depthai-core. I use this command to generate the makefiles:

    cmake -S. -Bbuild -D'DEPTHAI_BUILD_EXAMPLES=ON' -D'DEPTHAI_ENABLE_CURL=OFF' -D'BUILD_SHARED_LIBS=ON'

    And get these results

    [ 30%] Building CXX object CMakeFiles/depthai-core.dir/src/openvino/BlobReader.cpp.o

    [ 30%] Building C object CMakeFiles/depthai-core.dir/src/bspatch/bspatch.c.o

    [ 31%] Linking CXX shared library libdepthai-core.so

    /usr/bin/ld: /home/tony/.hunter/_Base/16cc954/a3a48bb/624857f/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_X86_64_TPOFF32 against `_ZGVZN6spdlog7details2os9thread_idEvE3tid' can not be used when making a shared object; recompile with -fPIC

    /usr/bin/ld: /home/tony/.hunter/_Base/16cc954/a3a48bb/624857f/Install/lib/libXLink.a(PlatformDeviceFd.cpp.o): relocation R_X86_64_PC32 against symbol `_ZNSt13unordered_mapImPvSt4hashImESt8equal_toImESaISt4pairIKmS0_EEED1Ev' can not be used when making a shared object; recompile with -fPIC

    /usr/bin/ld: final link failed: bad value

    collect2: error: ld returned 1 exit status

    make[2]: *** [CMakeFiles/depthai-core.dir/build.make:1420: libdepthai-core.so] Error 1

    make[1]: *** [CMakeFiles/Makefile2:455: CMakeFiles/depthai-core.dir/all] Error 2

    I cannot build depthai-core with SHARED_LIBS=ON

    I am thinking if I can just take a few classes from depthai-core and include them in my codes. Now many classes would I need to include ( pipeline, ?)

    I cant build with shared libs on. I just tried without building examples. I still dont understand why I need anything in .hunter.

    cmake -S. -Bbuild -D'DEPTHAI_ENABLE_CURL=OFF' -D'BUILD_SHARED_LIBS=ON'

    cmake --build build

    usr/bin/ld: /home/tony/.hunter/_Base/16cc954/a3a48bb/624857f/Install/lib/libspdlog.a(spdlog.cpp.o): relocation R_X86_64_TPOFF32 against `_ZGVZN6spdlog7details2os9thread_idEvE3tid' can not be used when making a shared object; recompile with -fPIC

    /usr/bin/ld: /home/tony/.hunter/_Base/16cc954/a3a48bb/624857f/Install/lib/libXLink.a(PlatformDeviceFd.cpp.o): relocation R_X86_64_PC32 against symbol `_ZNSt13unordered_mapImPvSt4hashImESt8equal_toImESaISt4pairIKmS0_EEED1Ev' can not be used when making a shared object; recompile with -fPIC

    /usr/bin/ld: final link failed: bad value

    collect2: error: ld returned 1 exit status

    make[2]: *** [CMakeFiles/depthai-core.dir/build.make:1420: libdepthai-core.so] Error 1

    make[1]: *** [CMakeFiles/Makefile2:121: CMakeFiles/depthai-core.dir/all] Error 2

    Well I tried adding the sub directory and there many warning messages and then an error related to openssl.

    I have attached a log.

    I installed openssl 3.0.2 but could not get around that error.

    echo $OPENSSL_ROOT_DIR

    /usr/src/openssl-3.0.2

    Thank you

      tonya
      Remove .hunter and build directories when changing the build command. Looks OK otherwise,

      tonya If I build depthai with option to build the examples, then my integration of depthai-core will require opencv?

      If you build with shared option, you get two .so objects, libdepthai-core.so and libdepthai-opencv.so, the second one includes opencv as well, the core doesn't.

      For examples, opencv needs to be included, yes.

      Thanks,
      Jaka