Hi Leonardo,
I am getting this error too when I try to compile GStreamer Sample Application. I did source the environment script.I am able to compile and run a HelloWorld.c Application.
Sample application is from Chapter 10. Your first application link. The makefile I am using is attached below,
Makefile:
------------------------------------------------------------------------------------------------------------------------------------
# define the C compiler to use
CC = /opt/poky/1.4+snapshot/sysroots/i686-pokysdk-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
# define any compile-time flags
CFLAGS = -Wall -g
# define any directories containing header files other than /usr/include
INCLUDES = -I/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/include/glib-2.0 -I/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/lib/glib-2.0/include/ -I/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/include/gstreamer-0.10/ -I/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/include/libxml2
LFLAGS = -L/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/lib
# define any libraries to link into executable:
LIBS = -lglib-2.0 -lxml2 -lgstreamer-0.10 -lgobject-2.0 -lz -lgmodule-2.0 -lffi
# define the C source files
SRCS = hellogst.c
# define the C object files
OBJS = $(SRCS:.c=.o)
# define the executable file
MAIN = hellogst
.PHONY: depend clean
all: $(MAIN)
@echo Simple compiler named simple has been compiled
$(MAIN): $(OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $(MAIN) $(OBJS) $(LFLAGS) $(LIBS)
# this is a suffix replacement rule for building .o's from .c's
.c.o:
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
clean:
$(RM) *.o *~ $(MAIN)
depend: $(SRCS)
makedepend $(INCLUDES) $^
------------------------------------------------------------------------------------------------------------------------------------
Compilation Error:
------------------------------
$ make
/opt/poky/1.4+snapshot/sysroots/i686-pokysdk-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -Wall -g -I/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/include/glib-2.0 -I/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/lib/glib-2.0/include/ -I/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/include/gstreamer-0.10/ -I/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/include/libxml2 -c hellogst.c -o hellogst.o
/opt/poky/1.4+snapshot/sysroots/i686-pokysdk-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -Wall -g -I/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/include/glib-2.0 -I/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/lib/glib-2.0/include/ -I/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/include/gstreamer-0.10/ -I/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/include/libxml2 -o hellogst hellogst.o -L/home/suman/fsl-community-bsp/build-fb/tmp/sysroots/imx6qsabresd/usr/lib -lglib-2.0 -lxml2 -lgstreamer-0.10 -lgobject-2.0 -lz -lgmodule-2.0 -lffi
/opt/poky/1.4+snapshot/sysroots/i686-pokysdk-linux/usr/libexec/cortexa9hf-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.1/ld: cannot find /lib/libc.so.6
/opt/poky/1.4+snapshot/sysroots/i686-pokysdk-linux/usr/libexec/cortexa9hf-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.1/ld: cannot find /usr/lib/libc_nonshared.a
/opt/poky/1.4+snapshot/sysroots/i686-pokysdk-linux/usr/libexec/cortexa9hf-vfp-neon-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.1/ld: cannot find /lib/ld-linux-armhf.so.3
collect2: error: ld returned 1 exit status
make: *** [hellogst] Error 1