IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

GTK+ avec C & C++ Discussion :

Création package compilable avec Autotools


Sujet :

GTK+ avec C & C++

  1. #1
    Nouveau membre du Club
    Homme Profil pro
    Géomaticien
    Inscrit en
    Février 2010
    Messages
    63
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Géomaticien

    Informations forums :
    Inscription : Février 2010
    Messages : 63
    Points : 25
    Points
    25
    Par défaut Création package compilable avec Autotools
    Bonjour à tous,

    J'ai bien avancé sur un projet et je souhaite dans quelques temps pouvoir le distribuer, càd qu'il puisse s'installer sur divers systèmes Linux. Jusqu'à présent pour mes tests, je compilais mon projet selon la commande suivante :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ~/ gcc -Wall main.c goopatch.c `pkg-config --libs gtk+-2.0 goocanvas gmodule-2.0 --cflags` -o cc10kx
    J'ai suivi divers tuto pour la création d'un Makefile y compris celui présent ici, mais ce dernier utilise une méthode plus "manuel". Il me semble qu'il vaudrait mieux passer par les autotools, enfin c'est l'opinion que je me suis fait, notamment en décortiquant des Makefile de projets open source. Le problème, c'est que c'est la galère pour trouver un tuto clair sur le sujet. Bon, heureusement j'ai fini par me dépatouiller et voici comment je procède.

    J'ai crée d'abord un configure.ac modifié aux besoins, sur la base d'autoscan :
    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
    #                                               -*- Autoconf -*-
    # Process this file with autoconf to produce a configure script.
     
    AC_PREREQ([2.60])
    AC_INIT([goode], [0.1])
    AM_INIT_AUTOMAKE([-Wall -Werror dist-bzip2])
     
    AC_PROG_CC
    AM_PROG_CC_C_O
    AC_PROG_INSTALL
    AC_PROG_LIBTOOL
    AC_PROG_MAKE_SET
     
    AM_PATH_GTK_2_0([2.10.0],,AC_MSG_ERROR([Gtk+ 2.10.0 or higher required.]))
     
    AC_CONFIG_MACRO_DIR([m4])
     
    AC_CONFIG_HEADERS([config.h])
    AC_CONFIG_FILES([
            Makefile
            src/Makefile
            ])
    AC_OUTPUT
    J'ai ensuite crée un Makefile.am pour chaque niveau de répertoire.

    Makefile.am en racine :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    SUBDIRS=src src/interface
     
    ACLOCAL_AMFLAGS = -I m4
     
    EXTRA_DIST = HACKING
    CLEANFILES = *~
    Makefile.am dans le dossier src :
    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
    bin_PROGRAMS=goode
     
     
    goode_LDADD =						\
    		$(GTK_LIBS)				\
    		$(GOOCANVAS_LIBS)
    		@GTK_LIBS@
     
     
    goode_CFLAGS =						\
    		$(GTK_CFLAGS)				\
    		$(GOOCANVAS_CFLAGS)		\
    		@GTK_CFLAGS@				\
    		$(PLATFORM_CFLAGS)
     
    goode_INCLUDES =					\
    		$(GTK_CFLAGS)				\
            	$(GOOCANVAS_CFLAGS)
     
    goode_SOURCES =					\
    		main.c main.h				\
    		goopatch.c goopatch.h			\
    		callback.c			                \
    		asm_editor.c asm_editor.h	\
    		config.c config.h			\
    		functions.c functions.h			\
    		patches.c patches.h			\
    		presets.c presets.h			\
    		routing.c routing.h			\
    Ensuite, je lance dans l'ordre suivant les autotools pour créer les scripts :
    autoheader --------> création du config.h.in
    libtoolize -----------> création de scripts libtool
    aclocal -------------> scripts aclocal
    autoconf -----------> création du script .configure
    automake -a -c ----> création du Makefile final

    Tout se passe bien, je fais le classique ./configure, ok, pas de problème, puis le tout aussi classique make, là la compilation échoue puisqu'il ne trouve pas les libs de goocanvas. Je ne sais pas comment renseigner dans les divers fichiers de scripts de rechercher la présence de la lib goocanvas. A noter que je ne veux pas recopier les headers de goocanvas dans mon projet, je veux que les utilisateurs voulant le compiler doivent avoir la lib goocanvas d'installer.

    Quelqu'un aurait une idée de comment renseigner l'utilisation de la lib goocanvas ?

    Merci d'avance.

  2. #2
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    J'avoue que les autotools me font penser à la jungle amazonienne. De mon côté j'ai laissé tomber. J'utilise Anjuta qui le fait pour moi. Mais le sujet reste intéressant.
    En cherchant je t'ai trouvé ce lien (en anglais). C'est toujours mieux que rien. En même temps j'ai trouvé pas mal de commentaires qui plébiscitent qmake. A voir aussi peut être de ce côté là...

  3. #3
    Nouveau membre du Club
    Homme Profil pro
    Géomaticien
    Inscrit en
    Février 2010
    Messages
    63
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Géomaticien

    Informations forums :
    Inscription : Février 2010
    Messages : 63
    Points : 25
    Points
    25
    Par défaut
    Ça me rassure de voir que je ne suis pas le seul à penser que c'est une jungle
    Et justement, je suis passé récemment à Anjuta, je croyais que cela générait automatiquement, j'ai bien renseigné les libs utilisée dans les propriétés du projet, mais Anjuta échoue à la création des scripts make. Puis-je te demander comment tu y parviens ?

  4. #4
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    Il faudrait que je vois les logs lors de la création. Ca me permettrait de voir ce qui coince.

  5. #5
    Nouveau membre du Club
    Homme Profil pro
    Géomaticien
    Inscrit en
    Février 2010
    Messages
    63
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Géomaticien

    Informations forums :
    Inscription : Février 2010
    Messages : 63
    Points : 25
    Points
    25
    Par défaut
    Tout simplement :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    Building in directory: /home/moravski/Travaux/Programmation/goode
    autoreconf -i --force CFLAGS=-O2 CXXFLAGS=-O2 JFLAGS=-O2 FFLAGS=-O2
    autoreconf-2.65: `configure.ac' or `configure.in' is required
    Terminé sur un échec
    Temps total*: 1 secondes
    le configure.ac est pourtant bien présent (celui que j'ai mis plus haut).

  6. #6
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    C'est le log de ton propre autotools ou bien celui d'anjuta?

  7. #7
    Nouveau membre du Club
    Homme Profil pro
    Géomaticien
    Inscrit en
    Février 2010
    Messages
    63
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Géomaticien

    Informations forums :
    Inscription : Février 2010
    Messages : 63
    Points : 25
    Points
    25
    Par défaut
    C'est bien celui d'Anjuta.

  8. #8
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    Pour commencer, lorsqu'Anjuta ne veut plus compiler je reconfigure le projet. Pour cela je vais dans "Construire->configurer le projet".
    Dans la fenêtre qui s'ouvre je coche "Régénérer le projet", je choisis la configuration par défaut et j'exécute le tout. Bizarrement lorsque j'essaie d'utiliser la version "Débogage" ca plante aussi.

  9. #9
    Nouveau membre du Club
    Homme Profil pro
    Géomaticien
    Inscrit en
    Février 2010
    Messages
    63
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Géomaticien

    Informations forums :
    Inscription : Février 2010
    Messages : 63
    Points : 25
    Points
    25
    Par défaut
    Décidément, je suis maudit avec les EDI, il n'y a pas un qui me plait/fonctionne correctement chez moi...

    En propriété de compilation, il met le paramètre '--enable-maintainter-mode' qui n'existe pas pour autoreconf. Je l'efface. Ensuite, lorsque je change le répertoire de construction, il revient toujours dans le répertoire racine à celui du projet
    Bref, j'ai toujours le message d'autoreconf.


    Ah, je viens de réessayer, ça marche, jusqu'à ce qu'il me dit qu'il ne trouve pas de Makefile.am. Il n'est pas sensé le créer lui-même ? Alors j'ai mis celui plus haut. Voilà ce qu'il me dit :
    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
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    Building in directory: /home/alex/Divers/Travaux/Programmation/cc10kx
    /home/alex/Divers/Travaux/Programmation/cc10kx/configure
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... none
    checking whether gcc and cc understand -c and -o together... yes
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking how to print strings... printf
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for fgrep... /bin/grep -F
    checking for ld used by gcc... /usr/x86_64-pc-linux-gnu/bin/ld
    checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking for /usr/x86_64-pc-linux-gnu/bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for ar... ar
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    checking whether make sets $(MAKE)... (cached) yes
    checking for pkg-config... /usr/bin/pkg-config
    checking for GTK+ - version >= 2.10.0... yes (version 2.20.1)
    configure: creating ./config.status
    config.status: error: cannot find input file: `Makefile.in'
    Terminé sur un échec
    Temps total*: 6 secondes

  10. #10
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    Si ca ne te déranges pas tu peux m'envoyez le dossier compressé de ton projet que je vois ce que ca donne chez moi. (Je suis sous Ubuntu).

  11. #11
    Modérateur

    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juin 2009
    Messages
    1 395
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Industrie

    Informations forums :
    Inscription : Juin 2009
    Messages : 1 395
    Points : 2 002
    Points
    2 002
    Par défaut
    Citation Envoyé par gerald3d Voir le message
    J'avoue que les autotools me font penser à la jungle amazonienne. De mon côté j'ai laissé tomber. J'utilise Anjuta qui le fait pour moi. Mais le sujet reste intéressant.
    En cherchant je t'ai trouvé ce lien (en anglais). C'est toujours mieux que rien. En même temps j'ai trouvé pas mal de commentaires qui plébiscitent qmake. A voir aussi peut être de ce côté là...
    Hé bien j'ai abandonné les autotools également ! J'ai aussi galéré avec les autotools pendant un moment en tant que contributeur GNOME, et dans mon ancien job. Dans mon nouveau boulot, on utilise CMake et j'ai dû me former sur le tas... Résultat sans appel: le temps d'apprentissage est beaucoup moins long, et on arrive à un résultat correct très rapidement. J'ai néanmoins vu quelques petits bugs, mais on utilise une version un peu ancienne de CMake. KDE a déjà migré à CMake il y a quelques années, j'espère que GNOME en fera autant un jour. En attendant, je vous le conseille.
    Documentation officielle GTK+ 3:
    GTK en C, GTK en Python

    Tutoriels GTK+ 3:
    GTK en C, GTK en Python

    Tutoriels par l'exemple (platform-demos):
    GTK (tous langages)

  12. #12
    Expert confirmé
    Avatar de gerald3d
    Homme Profil pro
    Conducteur de train
    Inscrit en
    Février 2008
    Messages
    2 291
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Conducteur de train
    Secteur : Transports

    Informations forums :
    Inscription : Février 2008
    Messages : 2 291
    Points : 4 941
    Points
    4 941
    Billets dans le blog
    5
    Par défaut
    Et de 3! Est-ce que la non compréhension des autotools ne vient pas d'un manque criant de documentation? Ou bien est-ce vraiment peu pratique?

  13. #13
    Modérateur

    Homme Profil pro
    Développeur informatique
    Inscrit en
    Juin 2009
    Messages
    1 395
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Industrie

    Informations forums :
    Inscription : Juin 2009
    Messages : 1 395
    Points : 2 002
    Points
    2 002
    Par défaut
    C'est très puissant. Il y a de la documentation. C'est juste que c'est incroyablement compliqué. Plusieurs langages sont mis en oeuvre entre le shell, les macros m4, etc. Il faut souvent plusieurs versions installées en parallèle parce que toutes n'ont pas le même comportement. Bref, c'est juste une usine à gaz faite pour garder la compatibilité sur énormément de plateformes. Pour un projet qui débute, ce n'est à mon avis pas une bonne idée.

    Rien que le tutoriel CMake permet d'avoir en 30 minutes un bon aperçu de comment faire son projet.
    http://cmake.org/cmake/help/cmake_tutorial.html
    Documentation officielle GTK+ 3:
    GTK en C, GTK en Python

    Tutoriels GTK+ 3:
    GTK en C, GTK en Python

    Tutoriels par l'exemple (platform-demos):
    GTK (tous langages)

  14. #14
    Membre expérimenté
    Homme Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 259
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 259
    Points : 1 633
    Points
    1 633
    Par défaut
    Dans ton configure.ac, il faut que tu rajoutes un test pour vérifier si goocanvas est présent, à savoir quelque chose du type :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    PKG_CHECK_MODULES(GOOCANVAS, [goocanvas-2.0])
    Ensuite des variables GOOCANVAS_CFLAGS et GOOCANVAS_LIBS seront utilisables dans tes Makefile.am qui te donneront les options de compilation qui vont bien pour utiliser goocanvas.

  15. #15
    Nouveau membre du Club
    Homme Profil pro
    Géomaticien
    Inscrit en
    Février 2010
    Messages
    63
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Géomaticien

    Informations forums :
    Inscription : Février 2010
    Messages : 63
    Points : 25
    Points
    25
    Par défaut
    OK merci teuf c'est bien ça ! Toute petite rectification :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    PKG_CHECK_MODULES(GOOCANVAS, [goocanvas])
    Cependant je n'ai pas tout résolu, j'ai des problèmes de linkage. Penses-tu que je dois vérifier la présence de gmodule ? Ou utiliser un flag du genre --export-dynamic ?

  16. #16
    Membre expérimenté
    Homme Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 259
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 259
    Points : 1 633
    Points
    1 633
    Par défaut
    Sans voir les messages d'erreur, je ne pense rien du tout. Désolé pour le goocanvas-2.0, j'ai regardé la mauvaise branche dans le git

  17. #17
    Nouveau membre du Club
    Homme Profil pro
    Géomaticien
    Inscrit en
    Février 2010
    Messages
    63
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Géomaticien

    Informations forums :
    Inscription : Février 2010
    Messages : 63
    Points : 25
    Points
    25
    Par défaut
    Désolé, voici le message d'erreur :

    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
    make
    (CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/moravski/Travaux/Programmation/goode/missing --run autoheader)
    rm -f stamp-h1
    touch config.h.in
    cd . && /bin/sh ./config.status config.h
    config.status: creating config.h
    make  all-recursive
    make[1]: entrant dans le répertoire « /home/moravski/Travaux/Programmation/goode »
    Making all in src
    make[2]: entrant dans le répertoire « /home/moravski/Travaux/Programmation/goode/src »
    gcc -DHAVE_CONFIG_H -I. -I..    -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -pthread -I/usr/include/goocanvas-1.0 -I/usr/include/gtk-2.0 -I/usr/include/cairo -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14  -g -O2 -MT goode-main.o -MD -MP -MF .deps/goode-main.Tpo -c -o goode-main.o `test -f 'main.c' || echo './'`main.c
    mv -f .deps/goode-main.Tpo .deps/goode-main.Po
    gcc -DHAVE_CONFIG_H -I. -I..    -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -pthread -I/usr/include/goocanvas-1.0 -I/usr/include/gtk-2.0 -I/usr/include/cairo -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14  -g -O2 -MT cc10kx-goopatch.o -MD -MP -MF .deps/goode-goopatch.Tpo -c -o goode-goopatch.o `test -f 'goopatch.c' || echo './'`goopatch.c
    mv -f .deps/goode-goopatch.Tpo .deps/goode-goopatch.Po
    gcc -DHAVE_CONFIG_H -I. -I..    -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -pthread -I/usr/include/goocanvas-1.0 -I/usr/include/gtk-2.0 -I/usr/include/cairo -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14  -g -O2 -MT goode-callback.o -MD -MP -MF .deps/goode-callback.Tpo -c -o goode-callback.o `test -f 'callback.c' || echo './'`callback.c
    callback.c:24: erreur: expected ‘)’ before ‘*’ token
    callback.c:90: erreur: expected ‘)’ before ‘*’ token
    callback.c:99: erreur: expected ‘)’ before ‘*’ token
    callback.c:106: erreur: expected ‘)’ before ‘*’ token
    callback.c:112: erreur: expected ‘)’ before ‘*’ token
    callback.c:119: erreur: expected ‘)’ before ‘*’ token
    callback.c:131: erreur: expected ‘)’ before ‘*’ token
    callback.c:148: erreur: expected ‘)’ before ‘*’ token
    callback.c:154: erreur: expected ‘)’ before ‘*’ token
    callback.c:164: erreur: expected ‘)’ before ‘*’ token
    callback.c:184: erreur: expected ‘)’ before ‘*’ token
    callback.c:201: erreur: expected ‘)’ before ‘*’ token
    callback.c:226: erreur: expected ‘)’ before ‘*’ token
    callback.c:232: erreur: expected ‘)’ before ‘*’ token
    callback.c:242: erreur: expected ‘)’ before ‘*’ token
    callback.c:261: erreur: expected ‘)’ before ‘*’ token
    callback.c:271: erreur: expected ‘)’ before ‘*’ token
    callback.c:284: erreur: expected ‘)’ before ‘*’ token
    callback.c:300: erreur: expected ‘)’ before ‘*’ token
    callback.c:317: erreur: expected ‘)’ before ‘*’ token
    callback.c:323: erreur: expected ‘)’ before ‘*’ token
    callback.c:337: erreur: expected ‘)’ before ‘*’ token
    callback.c:356: erreur: expected ‘)’ before ‘*’ token
    callback.c:362: erreur: expected ‘)’ before ‘*’ token
    callback.c:378: erreur: expected ‘)’ before ‘*’ token
    callback.c:384: erreur: expected ‘)’ before ‘*’ token
    callback.c:400: erreur: expected ‘)’ before ‘*’ token
    callback.c:431: erreur: expected ‘)’ before ‘*’ token
    callback.c:437: erreur: expected ‘)’ before ‘*’ token
    callback.c:443: erreur: expected ‘)’ before ‘*’ token
    callback.c:449: erreur: expected ‘)’ before ‘*’ token
    callback.c:462: erreur: expected ‘)’ before ‘*’ token
    make[2]: *** [goode-callback.o] Erreur 1
    make[2]: quittant le répertoire « /home/moravski/Travaux/Programmation/goode/src »
    make[1]: *** [all-recursive] Erreur 1
    make[1]: quittant le répertoire « /home/moravski/Travaux/Programmation/goode »
    make: *** [all] Erreur 2
    En fait auparavant je compilais sans déclarer gmodule en pkg-config et après les dernières mises à jour de Gtk+ la compilation n'échouait pas mais mes callback (dans callback.c) n'était plus détecté et donc l'interface du programme ne fonctionnait plus, je suis obligé de déclarer gmodule depuis. Ca ressemble à ce problème non ?

  18. #18
    Membre expérimenté
    Homme Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 259
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 259
    Points : 1 633
    Points
    1 633
    Par défaut
    Il faudrait voir ce qu'il y a à la ligne 24 de ton callback.c

  19. #19
    Nouveau membre du Club
    Homme Profil pro
    Géomaticien
    Inscrit en
    Février 2010
    Messages
    63
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Géomaticien

    Informations forums :
    Inscription : Février 2010
    Messages : 63
    Points : 25
    Points
    25
    Par défaut
    Arf, désolé encore, voici :

    depuis la ligne 24 :
    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
    65
    void
    on_tlbbtnConnect_clicked (GtkToolButton *toolbutton, gpointer user_data)
    {
        if (! Connected)
        {
        GList        *IDPatches = NULL;
     
        patching_execute (GOODE->lstPatch, GOODEConfig, NULL);
        IDPatches = patches_get_name_id (GOODE->trvwPatch);
     
        guint        nID = g_list_length (IDPatches);
        guint        i = 0;
     
        while (i < nID)
        {
            PatchStruct *Patch = g_slice_new (PatchStruct);
            Patch->ID = (gchar *) ((PatchStruct *) g_list_nth_data (IDPatches, i))->ID;
            Patch->PatchName = (gchar *) ((PatchStruct *) g_list_nth_data (IDPatches, i))->PatchName;
     
            gchar *pID = ((PatchStruct *) g_list_nth_data (IDPatches, i))->ID + 1;
            gchar *PatchInfo = patch_get_info (NULL, GOODEConfig, pID);
     
            Patch->pIN = patch_registers_in (PatchInfo);
            Patch->pOUT = patch_registers_out (PatchInfo);
     
            Patches = g_list_append (Patches, Patch);
     
            i++;
        }
     
        Input = input_list (GOODEConfig);
     
        PatchStruct    *PatchInput = g_slice_new (PatchStruct);
        PatchInput->PatchName = "Input";
        PatchInput->ID = "";
        PatchInput->pIN = NULL;
        PatchInput->pOUT = Input;
     
        gdouble Y = routing_draw_input (PatchInput, goo_canvas_get_root_item (GOO_CANVAS (GOODE->CanvasRouting)));
     
        FX = fxbus_list (GOODEConfig);
     
        PatchStruct    *FXBusInput = g_slice_new (PatchStruct);
        FXBusInput->PatchName = "FXBus";
        FXBusInput->ID = "";
        FXBusInput->pIN = NULL;
        FXBusInput->pOUT = FX;
     
        routing_draw_fx (FXBusInput, goo_canvas_get_root_item (GOO_CANVAS (CC10KX->CanvasRouting)), Y);
     
        gdouble X = routing_draw_patches (Patches, goo_canvas_get_root_item (GOO_CANVAS (GOODE->CanvasRouting)));
     
        Output = output_list (GOODEConfig);
     
        PatchStruct    *PatchOutput = g_slice_new (PatchStruct);
        PatchOutput->PatchName = "Output";
        PatchOutput->ID = "";
        PatchOutput->pIN = Output;
        PatchOutput->pOUT = NULL;
     
        routing_draw_output (PatchOutput, goo_canvas_get_root_item (GOO_CANVAS (GOODE->CanvasRouting)), X);
     
        Connected = TRUE;
        }
    }
    Depuis la ligne 90, si besoin :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    void
    on_tlbbtnRefresh_clicked (GtkWidget *widget, gpointer data)
    {
        if (Connected)
        {
        patching_execute (Goode->lstPatch, GoodeConfig, NULL);
        }
    }
    Je m'arrête là les erreurs concernent presque tous les déclarations callback, donc toutes du même genre.

  20. #20
    Membre expérimenté
    Homme Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 259
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 259
    Points : 1 633
    Points
    1 633
    Par défaut
    Et tu inclues bien gtk.h dans ton fichier ?

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. Questions: création de Package VB6 avec InnoSetup
    Par megamario dans le forum Installation, Déploiement et Sécurité
    Réponses: 3
    Dernier message: 12/04/2013, 07h26
  2. Réponses: 4
    Dernier message: 05/10/2012, 09h31
  3. Javac RMI compilation avec multi-package
    Par jamboo dans le forum Entrée/Sortie
    Réponses: 3
    Dernier message: 12/10/2011, 22h09
  4. Problème de compilation avec package du type graphique
    Par M_Ostrogradsky dans le forum Erreurs - Avertissements
    Réponses: 5
    Dernier message: 28/02/2011, 09h24
  5. Autotools et compilation avec paramètres
    Par faldir dans le forum Systèmes de compilation
    Réponses: 0
    Dernier message: 09/04/2009, 14h14

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo