I've been having some trouble properly setting up the SDK to use in visual studio for c++ development.

I am using Visual Studio 2019 and running debug mode.

Although I've managed to get the RGB stream from the device, I keep getting thrown this asserts:
https://stackoverflow.com/questions/35310117/debug-assertion-failed-expression-acrt-first-block-header

It's probably got something to do with not having correct DLL files…

What I did at first is just downloaded the latest release from here: luxonis/depthai-core
Then just linked the include directiories and library directiories in visual studio and put the dll files (depthai-cored.dll and libusb-1.0d.dll) where my exe file is.

Then I also tried to get the library as is described in the github under "Non-CMake integration", so making a dynamic library with the cmake command and then install command. I'm guessing I need to somehow make it specify to build for visual studio 2019 or else it's just gonna build it for VS2022. I'm not too familiar with cmake and library building process so I would love if anyone could help clear up what am I doing wrong.

Starting a new project seems to not be a problem, but I'm trying to integrate the camera into an already existing project.

This is my project configuration:

I usually just download the bin, include and lib file and put them in my project folder and the include them in visual studio, but that seems to not work here. I'm not too sure how to properly build the library for this config and I haven't really found an answer myself so I would love to get some guidance.

I also keep getting this error from span.hpp file when I add it to my project. I fell like this is a c++14 and c++17 standards issue.

    Jan_eo Okay, so I've managed to figure out the source of this, there is a preprocessor definition in the project that undefines the std::byte cause of the name clash in other files, I've managed to bypass this by puttin #ifndef instead of #ifdef but the asserts are still flying every time i call "auto deviceInfoVec = dai:😃evice::getAnyAvailableDevice();"