Cross compile with external libraries


I have a legacy code that needs to be compiled with GStreamer and -lpthread.
For my Ubuntu machine, I use the following command:
gcc -Wall <file_name>.c -o <output_file> $(pkg-config --cflags --libs gstreamer-1.0) -lpthread -fno-stack-protector.
I’m unable to find a way to cross compile it with the legato toolchain.
The code uses following header files:
#include <glib.h>
#include <glib/gprintf.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <pthread.h>
Please suggest a way to get past the conundrum.
Thanks in Advance.


I think you need to add gst.h which should be desribed in manual.
it looks like Package gstreamer-1.0 was not found in the pkg-config search path you should add the directory containing `gstreamer-1.0.pc to the PKG_CONFIG_PATH environment variable
(Example:export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS/usr/lib/pkgconfig) and try the command.