‘run_nn_inference’ was not declared in this scope

When I try to build a C++ SDK with Tensor flow lite I get this error. I don’t know what to do. someone, please help.

In file included from source/camera.cpp:26:
./edge-impulse-sdk/classifier/ei_run_classifier.h: In function ‘EI_IMPULSE_ERROR {anonymous}::run_inference(const ei_impulse_t*, ei::matrix_t*, ei_impulse_result_t*, bool)’:
./edge-impulse-sdk/classifier/ei_run_classifier.h:132:31: error: ‘run_nn_inference’ was not declared in this scope; did you mean ‘run_inference’?
132 | EI_IMPULSE_ERROR nn_res = run_nn_inference(impulse, fmatrix, result, debug);
| ^~~~~~~~~~~~~~~~
| run_inference

Hi @pgpremgeetha,

Are you able to share your project? There are a number of possible reasons that run_nn_inference() cannot be found.

First, when did you download this particular C++ SDK from Edge Impulse and did you modify it in any way? Recent versions should now include an inferencing_engines directory under classifier/ that have the required definitions for run_nn_inference() you need, depending on which inference engine you chose. That is determined by the EI_CLASSIFIER_INFERENCING_ENGINE setting in model-parameters/model_metadata.h. All of these should be determined when you download the SDK from Edge Impulse and should not need to be modified.

Second, it sounds like the build process cannot find the required files. Please check your Makefile to ensure that it is able to locate all of the necessary headers and that those headers are in the expected directories. You might try building for your computer (rather than cross-compile) first to see how the Makefile is configured. Here is a good template project to try: GitHub - edgeimpulse/example-standalone-inferencing: Builds and runs an exported impulse locally (C++).

Hope that helps!