depthai-core icon indicating copy to clipboard operation
depthai-core copied to clipboard

missing include in file

Open MaximBozek-M-ECS opened this issue 7 months ago • 5 comments

I am getting this error for the include of the depthai library:

main.cpp:9:10: In included file: 'nop/serializer.h' file not found
Serialization.hpp:9:10: error occurred here

any idea what I'm missing?

MaximBozek-M-ECS avatar Apr 23 '25 14:04 MaximBozek-M-ECS

Is it normal that I had to install an additional 5 libraries to get this (not even) working? Is this library usable?

now getting this error:

main.cpp:9:10: In included file: no member named 'Empty' in 'nop::EncodingByte'; did you mean 'QtPrivate::QContainerImplHelper::Empty'?
optional.hpp:57:54: error occurred here
qarraydata.h:350:28: 'QtPrivate::QContainerImplHelper::Empty' declared here

MaximBozek-M-ECS avatar Apr 24 '25 08:04 MaximBozek-M-ECS

Hi @MaximBozek-M-ECS !

Can you share a bit more information on how you're trying to install the library (platform, as a subdirectory or an install, ...)? libnop is a public dependancy, so it's expected that it has to get installed alongside the DepthAI.

moratom avatar Apr 24 '25 19:04 moratom

For context, I am trying to add this to an existing app made by me which I created in Qt 5.15. Qt Creator is running on a debain VM. The app consist of a C++ backend and a qml frontend. These are the steps I went through:

  1. I git cloned the HTTPS link

  2. I then followed the building instructions, these are all commands I carried out:

git submodule update --init --recursive
cmake -S. -Bbuild -D'BUILD_SHARED_LIBS=ON'
cmake --build build
  1. With this, I still had to manually add: libnop, nlohmann/json, XLink and optional. After doing this, I still had errors like:
main.cpp:9:10: In included file: no member named 'Empty' in 'nop::EncodingByte'; did you mean 'QtPrivate::QContainerImplHelper::Empty'?
optional.hpp:57:54: error occurred here
qarraydata.h:350:28: 'QtPrivate::QContainerImplHelper::Empty' declared here

MaximBozek-M-ECS avatar Apr 25 '25 07:04 MaximBozek-M-ECS

@MaximBozek-M-ECS this is not expected at all, can you share the whole logs or ideally an example where this happen that is dockerized so our team can take a look and help you out?

We fetch all the dependanices with Hunter, so these should be resolved by our own library.

moratom avatar May 05 '25 12:05 moratom

From the logs, it seems like you're missing our public dependanices headers in your main.cpp file when compiling.

You can see this for an example on how to use library with adding add_subdirectory https://github.com/luxonis/depthai-core-example or install the library with DEPTHAI_INSTALL=ON during configure time.

moratom avatar May 05 '25 13:05 moratom