Create Intelligent Places code sample build error

Please provide complete information as applicable to your setup.

• Hardware Platform Jetson
• DeepStream Version 5.0
• JetPack Version 4.4
• Sample application and the configuration file content
I am following the create intelligent Places webinar to try and add nvanlaytics meta data to deepstream app 5

I have followed the 5 steps but am getting the below error when running make:

deepstream_test5_app_main.c: undefined reference to my_custom_parse_nvdsanalytics_meta_data
collect2: error: ld returned 1 exit status
Makefile:64: recipe for target 'deepstream-test5-app' failed

Appears there is an issue with my cpp and c file linking. In my deepstream_test5_app_main.c I have added:

void my_custom_parse_nvdsanalytics_meta_data (NvDsMetaList *l_user, MyUserMeta *data);

I have then created a deepstream_nvdsanalytics_meta.cpp as below:

extern "C" void 
my_custom_parse_nvdsanalytics_meta_data (NvDsMetaList *l_user, MyUserMeta *data)
    std::stringstream out_string;
    NvDsUserMeta *user_meta = (NvDsUserMeta *) l_user->data;
    /* convert to metadata */
    NvDsAnalyticsFrameMeta *meta =
        (NvDsAnalyticsFrameMeta *) user_meta->user_meta_data;
    /* Get the labels from nvdsanalytics config file */
        data->lcc_cnt_entry = meta->objLCCumCnt["Entry"];
        data->lcc_cnt_exit = meta->objLCCumCnt["Exit"];
        data->lccum_cnt = meta->objLCCumCnt["Entry"] - meta->objLCCumCnt["Exit"];

// Add this structure at includes/myheader.h //

/*typedef struct
guint32 lcc_cnt_exit;
guint32 lcc_cnt_entry;
} MyUserMeta;

The make file is:

APP:= deepstream-test5-app

TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -)



ifeq ($(TARGET_DEVICE),aarch64)

SRCS:= deepstream_test5_app_main.c deepstream_utc.c 
SRCS+= ../deepstream-app/deepstream_app.c ../deepstream-app/deepstream_app_config_parser.c
SRCS+= $(wildcard ../../apps-common/src/*.c)

INCS:= $(wildcard *.h)

PKGS:= gstreamer-1.0 gstreamer-video-1.0 x11 json-glib-1.0

OBJS:= $(SRCS:.c=.o)

CFLAGS+= -I../../apps-common/includes -I../../../includes -I../deepstream-app/ -DDS_VERSION_MINOR=0 -DDS_VERSION_MAJOR=5

LIBS+= -L$(LIB_INSTALL_DIR) -lnvdsgst_meta -lnvds_meta -lnvdsgst_helper -lnvdsgst_smartrecord -lnvds_utils -lnvds_msgbroker -lm \
       -lgstrtspserver-1.0 -ldl -Wl,-rpath,$(LIB_INSTALL_DIR)

CFLAGS+= `pkg-config --cflags $(PKGS)`

LIBS+= `pkg-config --libs $(PKGS)`

all: $(APP)

deepstream_nvdsanalytics_meta.o: deepstream_nvdsanalytics_meta.cpp $(INCS) Makefile
	$(CXX) -c -o $@ -Wall -Werror $(CFLAGS) $<

%.o: %.c $(INCS) Makefile
	$(CC) -c -o $@ $(CFLAGS) $<

$(APP): $(OBJS) Makefile
	$(CC) -o $(APP) $(OBJS) $(LIBS)

install: $(APP)
	cp -rv $(APP) $(APP_INSTALL_DIR)

	rm -rf $(OBJS) $(APP)

What have I missed in linking the function? Thanks

I had the same error and haven’t been able to make it build either.

I checked that the Deepstream Test 5 built fine before editing the code.

Jetson Nano
Deepstream 5
Jetpack 4.4

Are you using DS 5.0 GA or DP?

I’m using
Jetpack 32.4.3
Deepstream 5.0 GA downloaded from here does the developer preview have things that the GA doesn’t have?