0
votes

I've installed the following two msi on my Windows 7 (basic) 64-bit — I downloaded the msi from here.

  • gstreamer-sdk-devel-x86_64-2013.6.msi
  • gstreamer-sdk-x86_64-2013.6.msi

Now I'm trying to build this hello world program using MinGW (GCC 4.8.1) and the linker is giving me trouble, saying this:

C:\Users\Apelles\AppData\Local\Temp\ccwLMXuu.o: In function `gst_message_unref':
C:/gstreamer-sdk/0.10/x86_64/include/gstreamer-0.10/gst/gstmessage.h:347: undefined reference to `gst_mini_object_unref'
C:\Users\Apelles\AppData\Local\Temp\ccwLMXuu.o: In function `main':
F:\projects\gstreamer/helloworld.c:9: undefined reference to `gst_init'
F:\projects\gstreamer/helloworld.c:12: undefined reference to `gst_parse_launch'
F:\projects\gstreamer/helloworld.c:15: undefined reference to `gst_element_set_state'
F:\projects\gstreamer/helloworld.c:18: undefined reference to `gst_element_get_bus'
F:\projects\gstreamer/helloworld.c:19: undefined reference to `gst_bus_timed_pop_filtered'
F:\projects\gstreamer/helloworld.c:24: undefined reference to `gst_object_unref'
F:\projects\gstreamer/helloworld.c:25: undefined reference to `gst_element_set_state'
F:\projects\gstreamer/helloworld.c:26: undefined reference to `gst_object_unref'
collect2.exe: error: ld returned 1 exit status

Which lib(s) am I missing?

Here are options which I used to build the project (taken from my make output):

gcc helloworld.c -ggdb -Wall -Wextra -ansi -std=c99 -Wno-unused-parameter -mms-bitfields -IC:/gstreamer-sdk/0.10/x86_64/include/gtk-2.0 -IC:/gstreamer-sdk/0.10/x86_64/lib/gtk-2.0/include -IC:/gstreamer-sdk/0.10/x86_64/include/atk-1.0 -IC:/gstreamer-sdk/0.10/x86_64/include/cairo -IC:/gstreamer-sdk/0.10/x86_64/include/gdk-pixbuf-2.0 -IC:/gstreamer-sdk/0.10/x86_64/include/pango-1.0 -IC:/gstreamer-sdk/0.10/x86_64/include/glib-2.0 -IC:/gstreamer-sdk/0.10/x86_64/lib/glib-2.0/include -IC:/gstreamer-sdk/0.10/x86_64/include/pixman-1 -IC:/gstreamer-sdk/0.10/x86_64/include/fontconfig -IC:/gstreamer-sdk/0.10/x86_64/include/freetype2 -IC:/gstreamer-sdk/0.10/x86_64/include -IC:/gstreamer-sdk/0.10/x86_64/include/libpng15 -mms-bitfields -IC:/gstreamer-sdk/0.10/x86_64/include/gstreamer-0.10 -IC:/gstreamer-sdk/0.10/x86_64/include/glib-2.0 -IC:/gstreamer-sdk/0.10/x86_64/lib/glib-2.0/include -IC:/gstreamer-sdk/0.10/x86_64/include/libxml2 -LC:/gstreamer-sdk/0.10/x86_64/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lintl -LC:/gstreamer-sdk/0.10/x86_64/lib -lgstinterfaces-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lxml2 -lglib-2.0 -lintl

What is lacking in this?

What should I do in order to resolve this?

1
probably gstreamer itself, since gst_init isn't available.Marc B
@MarcB: Dont the installed msi contain it? What did I not install (or missed while configuring)?Nawaz
you've got -lgstreamer-0.10 in there, but that'd only be useful if the gstreamer stuff is in the include/linker path.Marc B
@MarcB: I can guess that some specific gstreamer stuff is missing in the path, but I need to know what that specific thing is?Nawaz

1 Answers

3
votes

I suspect your are using MinGW's default GCC compiler which targets the x86 architecture but you have downloaded the x86_64 version of the SDK. The linker can find the libraries but I won't be able to use them.

We strongly recommend to use cerbero's build system to setup the development environment. It will take care of downloading a working toolchain and compile all the build dependencies (autotools, gettext, libtoo, pkg-config, etc...)

You will find detailed instructions here in the section Build a single project with the SDK

In short:

  1. checkout cerbero's repo
  2. run the bootstrap command with: ./cerbero-uninstalled -c config/win64.cbc bootstrap
  3. enter the development shell with: ./cerbero-uninstalled -c config/win64.cbc shell