Deepstream-app compilation issues

All -

Just recently installed the latest JetPack. After a clean installation, I was initially able to compile the deepstream-app with out any errors. After making some code changes to deepstream_app.c, I started getting errors when the make utility tries to link the three (.o) objects into the deep-stream-app executable.

Here’s a sample of the errors generated by the make utility on the final phase of the process (building the deepstream-app):

cc deepstream_app.o -o deepstream_app
/usr/lib/gcc/aarch64-linux-gnu/7/…/…/…/aarch64-linux-gnu/Scrt1.o: In function _start': (.text+0x18): undefined reference to main’
(.text+0x1c): undefined reference to main' deepstream_app.o: In function gst_message_unref’:
deepstream_app.c:(.text+0x10): undefined reference to gst_mini_object_unref' deepstream_app.o: In function watch_source_status’:
deepstream_app.c:(.text+0x44): undefined reference to g_print' deepstream_app.c:(.text+0x64): undefined reference to reset_source_pipeline’
deepstream_app.c:(.text+0x68): undefined reference to reset_source_pipeline' deepstream_app.c:(.text+0x78): undefined reference to g_timeout_add’
deepstream_app.o: In function bus_callback': deepstream_app.c:(.text+0xc8): undefined reference to _gst_debug_min’
deepstream_app.c:(.text+0xcc): undefined reference to _gst_debug_min' deepstream_app.c:(.text+0xdc): undefined reference to NVDS_APP’
deepstream_app.c:(.text+0xe0): undefined reference to NVDS_APP' deepstream_app.c:(.text+0x118): undefined reference to gst_message_type_get_name’

I have removed all my code changes and am back to the original deestream_app.c file, but I continue to get these errors. The individual object (.o) compile just fine without any errors.

I searched online, but can’t find a solution. What am I missing?

Any help would be appreciated.

Screenshot from 2020-03-26 14-43-56

Never mind. Duh. I figured it out.

It was the “deepstream_app (another copy).c” file that was messing it up.