• DepthAI
  • depthai-core-example-main has compiler error C2838 'Empty' in optional.hpp

Hello !
I'm trying to build depthai-core-example-main by using depthai-core-v2.17.3-win64 on VS2022.
However, it has compiler error C2838 'Empty' : illegal qualified name in member declaration on line 65 and 79 in depthai-core-v2.17.3-win64\include\depthai-shared\common\optional.hpp.
Somebody please tell me How should I do.
Thanks in advance.

Hi @kfuji3

Do you mind checking where the nop (libnop) library is being sourced from?

Also, do you mind modifying the file and adding this to the top:

#include <nop/base/encoding.h>

And retesting?

    kfuji3

    As additional informations,
    I installed
    <package id="nlohmann.json" version="3.11.2" targetFramework="native" />
    from nuget.org.

    And added include directory in VS2022:
    libnop-master\include;
    depthai-core-v2.17.3-win64\include;
    depthai-core-v2.17.3-win64\include\depthai-shared\3rdparty;
    depthai-core-v2.17.3-win64\lib\cmake\depthai\dependencies\include;
    OpenCV\build\include

    That's all.

      kfuji3

      Use libnop from Luxonis on develop branch instead of master branch. Or use the included lib/cmake/depthai/dependencies/...

        themarpe

        Thank you for your quick reply.

        After I removed "libnop-master/include" from include directory in VS2022,
        the compile errors were gone.

        Thanks again, themarpe !