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

Plateformes Discussion :

Problème de compilation d'un projet SDL et Qt sur Mac OS X 10.6 [macOS]


Sujet :

Plateformes

  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Août 2009
    Messages
    26
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2009
    Messages : 26
    Par défaut Problème de compilation d'un projet SDL et Qt sur Mac OS X 10.6
    Bonjour,

    Je n'arrive pas a compiler un projet combinant SDL et Qt sur mon mac.
    Application installer:
    - SDL (1.2.14)
    - Qt Creator (1.3.0)
    - Qt 32bits(4.6.0)
    - GCC (4.2.1)

    Projet que j'essaye de compiler => http://irmatden.developpez.com/tutoriels/sdl/

    Je voudrait savoir si quelqu'un a déjà réussie a le faire si oui comment ?
    J'ai recompiler SDL sur mac pour l'installer.

    Quoique je fasse j'ai toujoru cette 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
    Exécution des étapes de compilation pour le projet sdl_qt...
    Lancement : /usr/bin/make clean -w
    make: Entering directory `/Users/macko_j/Downloads/sdl_qt'
    rm -f main.moc
    rm -f main.o
    rm -f *~ core *.core
    make: Leaving directory `/Users/macko_j/Downloads/sdl_qt'
    Terminé avec le code de sortie 0.
    Configuration non modifiée, passe l'étape QMake.
    Lancement : /usr/bin/make -w
    make: Entering directory `/Users/macko_j/Downloads/sdl_qt'
    /Developer/Tools/Qt/moc -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.6/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I. -I-I/usr/local/include/SDL -I-D_GNU_SOURCE=1 -I-D_THREAD_SAFE -I. -F/Library/Frameworks -D__APPLE__ -D__GNUC__ main.cpp -o main.moc
    g++ -c -pipe -g -gdwarf-2 -arch i386 -Wall -W -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.6/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I. -I-I/usr/local/include/SDL -I-D_GNU_SOURCE=1 -I-D_THREAD_SAFE -I. -F/Library/Frameworks -o main.o main.cpp
    g++ -headerpad_max_install_names -arch i386 -o sdl_qt.app/Contents/MacOS/sdl_qt main.o -F/Library/Frameworks -L/Library/Frameworks -L/usr/local/lib /usr/local/lib/libSDLmain.a /usr/local/lib/libSDL.a -Wl,-framework,OpenGL -Wl,-framework,Cocoa -Wl,-framework,ApplicationServices -Wl,-framework,Carbon -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,IOKit -framework QtGui -framework QtCore
    ld: warning: in /usr/local/lib/libSDLmain.a, file is not of required architecture
    ld: warning: in /usr/local/lib/libSDL.a, file is not of required architecture
    Undefined symbols:
    "_SDL_LockSurface", referenced from:
    SDLWidget::onRefresh() in main.o
    "_SDL_UpdateRect", referenced from:
    SDLWidget::onRefresh() in main.o
    "_SDL_SetVideoMode", referenced from:
    SDLWidget::showEvent(QShowEvent*) in main.o
    "_SDL_FillRect", referenced from:
    SDLWidget::onRefresh() in main.o
    "_SDL_MapRGBA", referenced from:
    SDLWidget::drawStarfield() in main.o
    "_SDL_UnlockSurface", referenced from:
    SDLWidget::onRefresh() in main.o
    "_SDL_Init", referenced from:
    SDLWidget::showEvent(QShowEvent*) in main.o
    "_SDL_Quit", referenced from:
    SDLWidget::~SDLWidget()in main.o
    SDLWidget::~SDLWidget()in main.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make: *** [sdl_qt.app/Contents/MacOS/sdl_qt] Error 1
    make: Leaving directory `/Users/macko_j/Downloads/sdl_qt'
    Terminé avec le code de sortie 2.
    Erreur lors de la compilation du projet sdl_qt
    lors de l'éxecution de l'étape 'Make'
    Merci d'avance pour votre aide

  2. #2
    Responsable Qt & Livres


    Avatar de dourouc05
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Août 2008
    Messages
    26 772
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Août 2008
    Messages : 26 772
    Par défaut
    Salut,

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    ld: warning: in /usr/local/lib/libSDLmain.a, file is not of required architecture
    ld: warning: in /usr/local/lib/libSDL.a, file is not of required architecture
    Tu as les bons symboles, mais pas pour la bonne architecture (probablement pour PPC, et tu dois avoir un MacIntel, vu que tu es sous Snow Leopard). Il faut donc recompiler pour Intel la SDL et la réinstaller, puis ça onfctionnera.
    Vous souhaitez participer aux rubriques Qt (tutoriels, FAQ, traductions) ou HPC ? Contactez-moi par MP.

    Créer des applications graphiques en Python avec PyQt5
    Créer des applications avec Qt 5.

    Pas de question d'ordre technique par MP !

  3. #3
    Membre averti
    Profil pro
    Inscrit en
    Août 2009
    Messages
    26
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2009
    Messages : 26
    Par défaut
    C'était le bon problème mais je n'est pas compris comment c'est arriver puisque j'ai utiliser le configure pour compiler et sa a quand même échouer.

    L'idée est de changer la façon dont gcc compile puisque ce dernier compile la librairie en 64bit et pour le coup il est impossible de la charger dans Qt.

    Pour un tcsh
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    setenv CC "gcc -m32"
    setenv CXX "g++ -m32"
    Pour un bach
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    setenv CC="gcc -m32"
    setenv CXX="g++ -m32"
    Puis recompiler / installer la SDL et voila.

    Merci pour tout

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Problème de compilation d'un projet Qt avec OpenCV
    Par swito dans le forum Débuter
    Réponses: 2
    Dernier message: 25/05/2011, 14h35
  2. Problème de compilation d'un projet JPA
    Par felix79 dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 28/07/2009, 10h40
  3. Réponses: 4
    Dernier message: 18/05/2009, 01h43
  4. Réponses: 3
    Dernier message: 01/04/2009, 19h34

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