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

Caml Discussion :

[GTK][FreeBSD] Probleme Novice avec EMACS


Sujet :

Caml

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Inscrit en
    Octobre 2013
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Octobre 2013
    Messages : 2
    Points : 1
    Points
    1
    Par défaut [GTK][FreeBSD] Probleme Novice avec EMACS
    Bonjour,
    Je suis en pleine decouverte de FreeBSD et j'utilise Emacs Tuareg pour coder du OCaml.
    J'aimerai utiliser la librairie lablgtk2 mais j'ai plusieurs soucis.

    Quand j'entre la commande: pkg info
    Je trouve:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    gtk-3.8.2_1                    Gimp Toolkit for X11 GUI (current stable version)
    gtk-2.24.19_2                  Gimp Toolkit for X11 GUI (previous stable version)
    gtk-engines2-2.20.2_1          Theme engine for the GTK+-2.0 toolkit
    gtk-update-icon-cache-2.24.19  Gtk-update-icon-cache utility from the Gtk+ toolkit
    gtk-xfce-engine-3.0.1          Xfce gtk theme engine
    gtksourceview2-2.10.5_1        A text widget that adds syntax highlighting to the GtkTextView widget
    gtkspell-2.0.16_4
    Je trouve aussi des lib gnome et x11, bref j'ai ce qu'il faut.

    Ce pendant quand je veux compiler un fichier utilisant ocaml et gtk2, je recois un message type:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    Error: Unbound module GMain
    ou
    Error: Unbound module GWindow
    Voici mes fichiers:

    menu.ml
    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
    (* Initialisation de GTK. Voir la discussion plus loin. *)
    let _ = GMain.init ()
     
    (* Fenêtre principale de l'application. *)
    let window = GWindow.window
      ~title:"Tuto SdZ Exemple 1"
      ~height:50 
      ~width:100 ()
     
    (* Bouton qui souhaite le bonjour à l'utilisateur. *)
    let say_hello = GButton.button
      ~label:"Bonjour !"
      ~packing:window#add ()
     
    (* Fonction qui affiche le message sur stdout. *)
    let print_hello () =
      let user = Glib.get_user_name () in
      Printf.printf "Bonjour %s !\n%!" (String.capitalize user)
     
    let _ =
      window#connect#destroy ~callback:GMain.quit;
      say_hello#connect#clicked ~callback:print_hello;
      window#show ();
      GMain.main ()
    Mon Makefile:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    OCAMLMAKEFILE = ../OCamlMakefile
     
    SOURCES = menu.ml
    RESULT = menu
    PACKS = lablgtk2
    THREADS = yes
    OCAML=ocamlc
     
    include $(OCAMLMAKEFILE)
    Ma commande de compilation:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ocamlc -I +lablgtk2 -o menu lablgtk.cma gtkInit.cmo menu.ml
    La reponse:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    File "menu.ml", line 2, characters 8-18:
    Error: Unbound module GMain
    Toute aide sera grandement appreciee!
    Merci d'avance

  2. #2
    Membre émérite
    Avatar de SpiceGuid
    Homme Profil pro
    Inscrit en
    Juin 2007
    Messages
    1 704
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire (Rhône Alpes)

    Informations forums :
    Inscription : Juin 2007
    Messages : 1 704
    Points : 2 990
    Points
    2 990
    Par défaut [Racy Puppy Linux 5.5] Réponse rapide en aveugle
    Cela peut prendre, disons, un certain temps, avant qu'un membre utilisant une configuration 100% identique (gorgonite le diablotin ) ne te réponde.

    En attendant je te propose d'essayer ceci :
    1. Ouvre un shell dans le répertoire de menu.ml
    2. Entre la commande (compilation vers du code natif) :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ocamlopt.opt -w s -o menu -I +lablgtk2 lablgtk.cmxa menu.ml
    Du même auteur: mon projet, le dernier article publié, le blog dvp et le jeu vidéo.
    Avant de poser une question je lis les règles du forum.

  3. #3
    Nouveau Candidat au Club
    Homme Profil pro
    Inscrit en
    Octobre 2013
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Octobre 2013
    Messages : 2
    Points : 1
    Points
    1
    Par défaut
    En fait c'est un probleme d'installation de lablgtk2.

    Version que j'ai download:
    Le ./configure donne ca:

    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
    ./configure
    checking for ocamlc... ocamlc
    ocaml version is 3.12.1
    ocaml library path is /usr/local/lib/ocaml
    Default install dirs are : /usr/local/lib/ocaml/lablgtk2 and /usr/local/lib/ocaml/stublibs
    Compile with ocamlc -I +lablgtk2
    checking for ocamlopt... ocamlopt
    checking ocamlopt version... ok
    ... ETC ...
    LablGTK configuration:
            threads         system
            native dynlink  yes
            GtkGLArea       not found
            libglade        yes
            librsvg         yes
            libgnomecanvas  yes
            libgnomeui      yes
            libpanelapplet  not found
            gtkspell        yes
            gtksourceview 1         not found
            gtksourceview 2         yes
            quartz          not found
     
            debug           no
            C compiler      cc
    Le make install:
    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
    make install                                               
    make -C src install
    "Makefile", line 34: Missing dependency operator
    "Makefile", line 36: Need an operator
    "Makefile", line 38: Need an operator
    "Makefile", line 41: Need an operator
    "Makefile", line 43: Need an operator
    "Makefile", line 45: Need an operator
    "Makefile", line 50: Need an operator
    "Makefile", line 52: Missing dependency operator
    "Makefile", line 54: Need an operator
    "Makefile", line 55: Need an operator
    "Makefile", line 57: Missing dependency operator
    "Makefile", line 59: Need an operator
    "Makefile", line 62: Need an operator
    "Makefile", line 65: Need an operator
    "Makefile", line 67: Need an operator
    "Makefile", line 69: Need an operator
    "Makefile", line 71: Need an operator
    "Makefile", line 72: Need an operator
    "Makefile", line 74: Need an operator
    "Makefile", line 80: Need an operator
    "Makefile", line 89: Need an operator
    "Makefile", line 95: Need an operator
    "Makefile", line 97: Need an operator
    "Makefile", line 102: Need an operator
    "Makefile", line 104: Need an operator
    "Makefile", line 110: Need an operator
    "Makefile", line 115: Need an operator
    "Makefile", line 116: Need an operator
    "Makefile", line 119: Need an operator
    "Makefile", line 125: Need an operator
    "Makefile", line 127: Need an operator
    "Makefile", line 132: Need an operator
    "Makefile", line 134: Need an operator
    "Makefile", line 137: Missing dependency operator
    "Makefile", line 139: Need an operator
    "Makefile", line 157: Need an operator
    "Makefile", line 158: Need an operator
    "Makefile", line 174: Need an operator
    "Makefile", line 176: Need an operator
    "Makefile", line 178: Need an operator
    "Makefile", line 241: Need an operator
    "Makefile", line 243: Need an operator
    "Makefile", line 245: Need an operator
    "Makefile", line 267: Missing dependency operator
    "Makefile", line 270: Need an operator
    "Makefile", line 273: warning: duplicate script for target "lablgtktop" ignored
    "Makefile", line 274: Need an operator
    "Makefile", line 309: Missing dependency operator
    "Makefile", line 311: Need an operator
    "Makefile", line 313: Missing dependency operator
    "Makefile", line 315: Need an operator
    "Makefile", line 375: Missing dependency operator
    "Makefile", line 377: Need an operator
    "Makefile", line 558: Need an operator
    "Makefile", line 560: Need an operator
    "Makefile", line 561: Need an operator
    "Makefile", line 563: Need an operator
    "Makefile", line 564: Need an operator
    "Makefile", line 567: Need an operator
    "Makefile", line 569: Need an operator
    "Makefile", line 570: Need an operator
    "Makefile", line 572: Need an operator
    "Makefile", line 573: Need an operator
    "Makefile", line 575: Need an operator
    "Makefile", line 576: Need an operator
    "Makefile", line 578: Need an operator
    "Makefile", line 579: Need an operator
    "Makefile", line 581: Need an operator
    "Makefile", line 582: Need an operator
    "Makefile", line 584: Need an operator
    make: fatal errors encountered -- cannot continue
    *** [install] Error code 1
    Que faire?
    Google ne m'aide pas vraiment.

  4. #4
    Membre émérite
    Avatar de SpiceGuid
    Homme Profil pro
    Inscrit en
    Juin 2007
    Messages
    1 704
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire (Rhône Alpes)

    Informations forums :
    Inscription : Juin 2007
    Messages : 1 704
    Points : 2 990
    Points
    2 990
    Par défaut old-install
    RTFM

    Bon ok c'est pas évident.
    C'est écrit dans le README, si tu n'as pas findlib tu dois faire make old-install
    Du même auteur: mon projet, le dernier article publié, le blog dvp et le jeu vidéo.
    Avant de poser une question je lis les règles du forum.

Discussions similaires

  1. Probleme avec emacs et la touche META (ESC a la place de ALT)
    Par neo62matrix dans le forum Autres éditeurs
    Réponses: 1
    Dernier message: 19/03/2010, 19h27
  2. [FreeBSD] probleme au redemarage avec Gvinum
    Par birdyz53 dans le forum BSD
    Réponses: 5
    Dernier message: 04/05/2007, 20h51
  3. Probleme avec emacs
    Par lelo108 dans le forum Autres éditeurs
    Réponses: 5
    Dernier message: 09/10/2006, 21h40
  4. Problème d'indentation avec emacs
    Par azertyman dans le forum Applications et environnements graphiques
    Réponses: 2
    Dernier message: 24/04/2006, 03h34
  5. Utiliser Borland C++ avec Emacs sous Windows
    Par Eikichi dans le forum Autres éditeurs
    Réponses: 2
    Dernier message: 02/03/2003, 08h40

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