"How to Successfully Build Edge Impulse C++ Library in Visual Studio?"

Hi everyone,

I successfully followed the tutorial to create a custom object detection model using Edge Impulse, and it worked well on my mobile phone.

As a proof of concept, I’m now trying to deploy and run the same model on a Windows laptop using the C++ library, following the documentation here: As a generic C++ library | Edge Impulse Documentation.

In my model dashboard, I used the deployment option to download the C++ library of the model files. The library includes several folders:

  • edge-impulse-sdk/ - The main toolkit with all the AI functionality
  • model-parameters/ - Settings for your specific model
  • tflite-model/ - Your actual trained AI model

However, I’m running into issues when trying to build the sample code from this GitHub repo:
GITHUB /edgeimpulse/example-standalone-inferencing

Using this include line:
#include “edge-impulse-sdk/classifier/ei_run_classifier.h”

Visual Studio throws hundreds of build errors, even though I’ve configured the C/C++ include directories and other project settings as described in the documentation.

Has anyone successfully built the C++ library from a test or custom model using Visual Studio or VS Code?

Any tips or working configurations would be greatly appreciated!

Thanks in advance,

Felix

Public project at: Simple Obj Detection with Edge Impulse and a mobile phone - Deployment - Edge Impulse

C/C++ → General → Additional Include Directories: Add paths to the folders containing header files.

$(ProjectDir)$(ProjectDir)model-parameters/

$(ProjectDir)edge-impulse-sdk/

$(ProjectDir)tflite-model/

C/C++ → Preprocessor → Preprocessor Definitions:

EIDSP_QUANTIZE_FILTERBANK=0

EI_CLASSIFIER_TFLITE_ENABLE_CMSIS_NN=0

EI_CLASSIFIER_TFLITE_ENABLE_ESP_NN=0

EI_CLASSIFIER_TFLITE_ENABLE_ARC=0

TF_LITE_DISABLE_X86_NEON=1

EI_CLASSIFIER_ALLOCATION_STATIC

EI_CLASSIFIER_ENABLE_DETECTION_POSTPROCESS_OP=1

NDEBUG