Bonjour à toutes et tous,

Je me tourne vers vous en espérant que vous puissiez répondre à mon problème.

Contexte :
Je souhaite développer une application utilisant gstreamer pour une cible embarquée à l'aide d'Eclipse et de la toolchain linaro. Malheureusement, après maintes tentatives, ça ne compile pas ... (la toolchain est opérationnelle, d'autre codes compilent mais utilisent des bibliothèques standards).

Voici mon code (qui est le Hello World de Gstreamer fourni sur leur site)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * main.c
 *
 *  Created on: 21 janv. 2016
 *      Author: vincent
 */
 
#include <stdlib.h>
#include <stdio.h>
#include <gst/gst.h>
 
int main(int argc, char *argv[]) {
 
  GstElement *pipeline;
  GstBus *bus;
  GstMessage *msg;
 
  /* Initialize GStreamer */
  gst_init(&argc,&argv);
 
  /* Build the pipeline */
  pipeline = gst_parse_launch ("playbin2 uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL);
 
  /* Start playing */
  gst_element_set_state (pipeline, GST_STATE_PLAYING);
 
  /* Wait until error or EOS */
  bus = gst_element_get_bus (pipeline);
  msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS);
 
  /* Free resources */
  if (msg != NULL)
	gst_message_unref (msg);
  gst_object_unref (bus);
  gst_element_set_state (pipeline, GST_STATE_NULL);
  gst_object_unref (pipeline);
  return 0;
}
Mes options de compilation :
Include paths :
  • /opt/gstreamer-sdk/include/gstreamer-0.10
  • /opt/gstreamer-sdk/include/gstreamer-0.10/gst
  • /opt/gstreamer-sdk/include/libxml2/
  • /opt/gstreamer-sdk/include/glib-2.0
  • /opt/gstreamer-sdk/lib/glib-2.0/include
  • /opt/gstreamer-sdk/include/glib-2.0/glib
  • /opt/gstreamer-sdk/include/glib-2.0/gobject
  • /home/vincent/tools/gcc-linaro/include
  • /usr/include/gstreamer-0.10
  • /opt/gstreamer-sdk/include


Pre-build steps : /opt/gstreamer-sdk/bin/./gst-sdk-shell
Libraries:
  • /home/vincent/tools/gcc-linaro/lib
  • /home/vincent/tools/gcc-linaro/arm-linux-gnueabihf/lib
  • /home/vincent/tools/gcc-linaro/arm-linux-gnueabihf/libc/lib


Log ce compilation :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
16:43:27 **** Build of configuration Debug for project snapshot ****
make pre-build main-build 
/opt/gstreamer-sdk/bin/./gst-sdk-shell
 
Building file: ../main.c
Invoking: Cross GCC Compiler
arm-linux-gnueabihf-gcc -I/opt/gstreamer-sdk/include/gstreamer-0.10 -I/opt/gstreamer-sdk/include/gstreamer-0.10/gst -I/opt/gstreamer-sdk/include/libxml2/ -I/opt/gstreamer-sdk/include/glib-2.0 -I/opt/gstreamer-sdk/lib/glib-2.0/include -I/opt/gstreamer-sdk/include/glib-2.0/glib -I/opt/gstreamer-sdk/include/glib-2.0/gobject -I/home/vincent/tools/gcc-linaro/include -I/usr/include/gstreamer-0.10 -I/opt/gstreamer-sdk/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.o" -o "main.o" "../main.c"
In file included from /opt/gstreamer-sdk/include/gstreamer-0.10/gst/gst.h:75:0,
                 from ../main.c:10:
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h: In function 'GDOUBLE_SWAP_LE_BE':
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:566:3: warning: left shift count >= width of type
   u.i = GUINT64_SWAP_LE_BE (u.i);
   ^
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:566:3: warning: left shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:566:3: warning: right shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:566:3: warning: right shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h: In function 'GST_READ_DOUBLE_LE':
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:755:3: warning: left shift count >= width of type
   u.i = GST_READ_UINT64_LE (data);
   ^
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:755:3: warning: left shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:755:3: warning: left shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:755:3: warning: left shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h: In function 'GST_READ_DOUBLE_BE':
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:783:3: warning: left shift count >= width of type
   u.i = GST_READ_UINT64_BE (data);
   ^
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:783:3: warning: left shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:783:3: warning: left shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:783:3: warning: left shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h: In function 'GST_WRITE_DOUBLE_LE':
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:865:3: warning: right shift count >= width of type
   GST_WRITE_UINT64_LE (data, u.i);
   ^
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:865:3: warning: right shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:865:3: warning: right shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:865:3: warning: right shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h: In function 'GST_WRITE_DOUBLE_BE':
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:892:3: warning: right shift count >= width of type
   GST_WRITE_UINT64_BE (data, u.i);
   ^
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:892:3: warning: right shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:892:3: warning: right shift count >= width of type
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstutils.h:892:3: warning: right shift count >= width of type
Finished building: ../main.c
 
Building target: snapshot
Invoking: Cross GCC Linker
arm-linux-gnueabihf-gcc -L/home/vincent/tools/gcc-linaro/lib -L/usr/lib/gstreamer-0.10 -L/opt/gstreamer-sdk/lib -L/home/vincent/tools/gcc-linaro/arm-linux-gnueabihf/lib -L/home/vincent/tools/gcc-linaro/arm-linux-gnueabihf/libc/lib -o "snapshot"  ./main.o   
./main.o: dans la fonction « gst_message_unref »:
/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gstmessage.h:347: référence indéfinie vers « gst_mini_object_unref »
./main.o: dans la fonction « main »:
/home/vincent/workspace/snapshot/Debug/../main.c:19: référence indéfinie vers « gst_init »
/home/vincent/workspace/snapshot/Debug/../main.c:22: référence indéfinie vers « gst_parse_launch »
/home/vincent/workspace/snapshot/Debug/../main.c:25: référence indéfinie vers « gst_element_set_state »
/home/vincent/workspace/snapshot/Debug/../main.c:28: référence indéfinie vers « gst_element_get_bus »
/home/vincent/workspace/snapshot/Debug/../main.c:29: référence indéfinie vers « gst_bus_timed_pop_filtered »
/home/vincent/workspace/snapshot/Debug/../main.c:34: référence indéfinie vers « gst_object_unref »
/home/vincent/workspace/snapshot/Debug/../main.c:35: référence indéfinie vers « gst_element_set_state »
/home/vincent/workspace/snapshot/Debug/../main.c:36: référence indéfinie vers « gst_object_unref »
collect2: error: ld returned 1 exit status
make: *** [snapshot] Erreur 1
 
16:43:27 Build Finished (took 518ms)

Le SDK de gstreamer est installé dans /opt/gstreamer-sdk. Ce qui est étrange c'est que l'autocomplétion fonctionne correctement.
Je suppose, en voyant le retour "error ld returned exist status" qu'il y a un problème de lien mais lequel ...


Merci de votre aide.