Search code examples
cazurevisual-studioiot

How add all libs src and main c files to same VS2022 project


I am tinkering with this C MXChip IoT project. This may be a supid question but hacking and navigating the code is difficult because there is no single project with all libraries and src files. Is there a way to have all main program, libs, src c and h files on the same Visual Studio project (not VSCode, I'm using VS2022)?

Most probably my tries were wrong, I tried dragging all the files into the solution of a new C project but references or variables are still unrecognized. Same result adding in solution properties->c/c++->Additional include directories/#using directories, and this latter approach doesn't show me the file to navigate and see the code.

I see the following folders with its subfolders used by the project: app;lib;shared;


Solution

  • I installed dev env vcpkg following guide https://vcpkg.io/en/getting-started.html with package azure-iot-sdk-c found in https://vcpkg.io/en/packages.html. vcpkg is a MSFT supported env. And also installed Azure IoT Edge Tools for VS 2022 following guide https://learn.microsoft.com/en-us/azure/iot-edge/how-to-visual-studio-develop-module?view=iotedge-1.4 and works great !