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

Développement 2D, 3D et Jeux Discussion :

probleme de compilation flight gear sous linux


Sujet :

Développement 2D, 3D et Jeux

  1. #1
    Membre actif
    Profil pro
    Inscrit en
    Octobre 2003
    Messages
    502
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2003
    Messages : 502
    Points : 227
    Points
    227
    Par défaut probleme de compilation flight gear sous linux
    bonjour,

    je suis sous linux suse 10.0 et je n'arrive pas à compiler les codes sources de flight gear . on me demande d'installer 3 programmes avant de compiler flight gear 1. la lib plib :ok pas de probleme.
    2.l'openal : ok pas de probleme.
    3.puis lors de la compilation du troisieme programmes : simgear 0.3.10 il y a les erreurs de compilation voici ces erreurs :

    make[3]: *** [visual_enviro.o] Erreur 1
    make[3]: Leaving directory `/home/domnik/Flight/SimGear-0.3.10/simgear/environment'
    make[2]: *** [all-recursive] Erreur 1
    make[2]: Leaving directory `/home/domnik/Flight/SimGear-0.3.10/simgear'
    make[1]: *** [all] Erreur 2
    make[1]: Leaving directory `/home/domnik/Flight/SimGear-0.3.10/simgear'
    make: *** [all-recursive] Erreur 1

    je voudrais savoir pourquoi ?

    merci

  2. #2
    Expert éminent sénior

    Avatar de fearyourself
    Homme Profil pro
    Ingénieur Informaticien Senior
    Inscrit en
    Décembre 2005
    Messages
    5 121
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Etats-Unis

    Informations professionnelles :
    Activité : Ingénieur Informaticien Senior
    Secteur : Industrie

    Informations forums :
    Inscription : Décembre 2005
    Messages : 5 121
    Points : 11 877
    Points
    11 877
    Par défaut
    Citation Envoyé par Asmod_D
    bonjour,

    je suis sous linux suse 10.0 et je n'arrive pas à compiler les codes sources de flight gear . on me demande d'installer 3 programmes avant de compiler flight gear 1. la lib plib :ok pas de probleme.
    2.l'openal : ok pas de probleme.
    3.puis lors de la compilation du troisieme programmes : simgear 0.3.10 il y a les erreurs de compilation voici ces erreurs :

    make[3]: *** [visual_enviro.o] Erreur 1
    make[3]: Leaving directory `/home/domnik/Flight/SimGear-0.3.10/simgear/environment'
    make[2]: *** [all-recursive] Erreur 1
    make[2]: Leaving directory `/home/domnik/Flight/SimGear-0.3.10/simgear'
    make[1]: *** [all] Erreur 2
    make[1]: Leaving directory `/home/domnik/Flight/SimGear-0.3.10/simgear'
    make: *** [all-recursive] Erreur 1

    je voudrais savoir pourquoi ?

    merci
    Il faudrait le(s) message(s) d'erreur qui sont au-dessus de tout cela...

    Jc

  3. #3
    Membre actif
    Profil pro
    Inscrit en
    Octobre 2003
    Messages
    502
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2003
    Messages : 502
    Points : 227
    Points
    227
    Par défaut
    salut,

    voici le code au dessus :


    if g++ -DHAVE_CONFIG_H -I. -I. -I../../simgear -I../.. -I/usr/X11R6/include -g -O2 -D_REENTRANT -MT visual_enviro.o -MD -MP -MF ".deps/visual_enviro.Tpo" -c -o visual_enviro.o visual_enviro.cxx; \
    then mv -f ".deps/visual_enviro.Tpo" ".deps/visual_enviro.Po"; else rm -f ".deps/visual_enviro.Tpo"; exit 1; fi
    In file included from ../../simgear/sound/soundmgr_openal.hxx:53,
    from visual_enviro.cxx:34:
    ../../simgear/sound/sample_openal.hxx:52:22: error: AL/alut.h: Aucun fichier ou répertoire de ce type
    make[3]: *** [visual_enviro.o] Erreur 1
    make[3]: Leaving directory `/home/domnik/Flight/SimGear-0.3.10/simgear/environment'
    make[2]: *** [all-recursive] Erreur 1
    make[2]: Leaving directory `/home/domnik/Flight/SimGear-0.3.10/simgear'
    make[1]: *** [all] Erreur 2
    make[1]: Leaving directory `/home/domnik/Flight/SimGear-0.3.10/simgear'
    make: *** [all-recursive] Erreur 1


    merci encore

  4. #4
    Membre actif
    Profil pro
    Inscrit en
    Octobre 2003
    Messages
    502
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2003
    Messages : 502
    Points : 227
    Points
    227
    Par défaut
    Citation Envoyé par Asmod_D
    salut,

    voici le code au dessus :

    Making install in sound
    make[2]: Entering directory `/home/domnik/Flight/SimGear-0.3.10/simgear/sound'
    g++ -g -O2 -D_REENTRANT -L/usr/X11R6/lib -o openal_test1 openal_test1.o ../.. /simgear/debug/libsgdebug.a -lopenal -lm
    openal_test1.o: dans la fonction « main »:
    /home/domnik/Flight/SimGear-0.3.10/simgear/sound/openal_test1.cxx:120: référence indéfinie vers « alutCreateBufferFromFile »
    collect2: ld returned 1 exit status
    make[2]: *** [openal_test1] Erreur 1
    make[2]: Leaving directory `/home/domnik/Flight/SimGear-0.3.10/simgear/sound'
    make[1]: *** [install-recursive] Erreur 1
    make[1]: Leaving directory `/home/domnik/Flight/SimGear-0.3.10/simgear'
    make: *** [install-recursive] Erreur 1

    j'ai cherché le code source de openal_test.c voila le code :

    #include <stdio.h>

    #ifdef __MINGW32__
    // This is broken, but allows the file to compile without a POSIX
    // environment.
    static unsigned int sleep(unsigned int secs) { return 0; }
    #else
    #include <unistd.h> // sleep()
    #endif

    #if defined( __APPLE__ )
    # define AL_ILLEGAL_ENUM AL_INVALID_ENUM
    # define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
    # include <OpenAL/al.h>
    # include <OpenAL/alc.h>
    # include <OpenAL/alut.h>
    #else
    # include <AL/al.h>
    # include <AL/alc.h>
    # include <AL/alut.h>
    #endif

    #include <simgear/debug/logstream.hxx>

    static void print_openal_error( ALuint error ) {
    if ( error == AL_INVALID_NAME ) {
    SG_LOG( SG_GENERAL, SG_ALERT, "AL_INVALID_NAME" );
    } else if ( error == AL_ILLEGAL_ENUM ) {
    SG_LOG( SG_GENERAL, SG_ALERT, "AL_ILLEGAL_ENUM" );
    } else if ( error == AL_INVALID_VALUE ) {
    SG_LOG( SG_GENERAL, SG_ALERT, "AL_INVALID_VALUE" );
    } else if ( error == AL_ILLEGAL_COMMAND ) {
    SG_LOG( SG_GENERAL, SG_ALERT, "AL_ILLEGAL_COMMAND" );
    } else if ( error == AL_OUT_OF_MEMORY ) {
    SG_LOG( SG_GENERAL, SG_ALERT, "AL_OUT_OF_MEMORY" );
    } else {
    SG_LOG( SG_GENERAL, SG_ALERT, "Unhandled error code = " << error );
    }
    }


    int main( int argc, char *argv[] ) {
    // initialize OpenAL
    ALCdevice *dev;
    ALCcontext *context;

    // initialize OpenAL
    if ( (dev = alcOpenDevice( NULL )) != NULL
    && ( context = alcCreateContext( dev, NULL )) != NULL ) {
    alcMakeContextCurrent( context );
    } else {
    context = 0;
    SG_LOG( SG_GENERAL, SG_ALERT, "Audio initialization failed!" );
    }

    // Position of the listener.
    ALfloat listener_pos[3];

    // Velocity of the listener.
    ALfloat listener_vel[3];

    // Orientation of the listener. (first 3 elements are "at", second
    // 3 are "up")
    ALfloat listener_ori[6];

    listener_pos[0] = 0.0;
    listener_pos[1] = 0.0;
    listener_pos[2] = 0.0;

    listener_vel[0] = 0.0;
    listener_vel[1] = 0.0;
    listener_vel[2] = 0.0;

    listener_ori[0] = 0.0;
    listener_ori[1] = 0.0;
    listener_ori[2] = -1.0;
    listener_ori[3] = 0.0;
    listener_ori[4] = 1.0;
    listener_ori[5] = 0.0;

    alListenerfv( AL_POSITION, listener_pos );
    alListenerfv( AL_VELOCITY, listener_vel );
    alListenerfv( AL_ORIENTATION, listener_ori );

    // Buffers hold sound data.
    ALuint buffer;

    // Sources are points emitting sound.
    ALuint source;

    // Position of the source sound.
    ALfloat source_pos[3];

    // Velocity of the source sound.
    ALfloat source_vel[3];

    // configuration values
    ALenum format;
    ALsizei size;
    ALvoid* data;
    ALsizei freq;
    ALboolean loop;

    source_pos[0] = 0.0; source_pos[1] = 0.0; source_pos[2] = 0.0;
    source_vel[0] = 0.0; source_vel[1] = 0.0; source_vel[2] = 0.0;

    // create an OpenAL buffer handle
    alGenBuffers(1, &buffer);
    ALuint error = alGetError();
    if ( error != AL_NO_ERROR ) {
    print_openal_error( error );
    SG_LOG( SG_GENERAL, SG_ALERT, "Failed to gen OpenAL buffer." );
    } else {
    SG_LOG( SG_GENERAL, SG_ALERT, "Buffer created ok!" );
    }

    // Load the sample file
    #if defined(ALUT_API_MAJOR_VERSION) && ALUT_API_MAJOR_VERSION >= 1

    buffer = alutCreateBufferFromFile("jet.wav"); // L ERREUR DU CODE
    if (buffer == AL_NONE) {
    SG_LOG( SG_GENERAL, SG_ALERT, "Failed to buffer data.");
    }

    #else
    # if defined (__APPLE__)
    alutLoadWAVFile( (ALbyte *)"jet.wav", &format, &data, &size, &freq );
    # else
    alutLoadWAVFile( (ALbyte *)"jet.wav", &format, &data, &size, &freq, &loop );
    # endif
    if (alGetError() != AL_NO_ERROR) {
    SG_LOG( SG_GENERAL, SG_ALERT, "Failed to load wav file.");
    }

    // Copy data to the internal OpenAL buffer
    alBufferData( buffer, format, data, size, freq );
    if (alGetError() != AL_NO_ERROR) {
    SG_LOG( SG_GENERAL, SG_ALERT, "Failed to buffer data.");
    }

    alutUnloadWAV( format, data, size, freq );
    #endif

    alGenSources(1, &source);
    if (alGetError() != AL_NO_ERROR) {
    print_openal_error( error );
    }

    alSourcei( source, AL_BUFFER, buffer );
    alSourcef( source, AL_PITCH, 1.0 );
    alSourcef( source, AL_GAIN, 1.0 );
    alSourcefv( source, AL_POSITION, source_pos );
    alSourcefv( source, AL_VELOCITY, source_vel );
    alSourcei( source, AL_LOOPING, loop );

    alSourcePlay( source );

    sleep(10);

    return 0;
    }



    merci encore

  5. #5
    Expert éminent sénior

    Avatar de fearyourself
    Homme Profil pro
    Ingénieur Informaticien Senior
    Inscrit en
    Décembre 2005
    Messages
    5 121
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Etats-Unis

    Informations professionnelles :
    Activité : Ingénieur Informaticien Senior
    Secteur : Industrie

    Informations forums :
    Inscription : Décembre 2005
    Messages : 5 121
    Points : 11 877
    Points
    11 877
    Par défaut
    La première erreur :

    ../../simgear/sound/sample_openal.hxx:52:22: error: AL/alut.h: Aucun fichier ou répertoire de ce type
    Voulait dire que tu n'avais pas le fichier d'en-tête alut.h dans le répertoire AL. Cela doit être réglé en installant la bonne bibliothèque (donc AL...).

    La 2ème :

    /home/domnik/Flight/SimGear-0.3.10/simgear/sound/openal_test1.cxx:120: référence indéfinie vers « alutCreateBufferFromFile »
    est simplement parce que tu n'as pas lié la bibliothèque AL à ton programme. Ajoute -lAL ou -lalut (je ne sais plus exactement ce qu'il faut mettre) pour résoudre le problème si tu as installé la bibliothèque correctement.

    Jc

  6. #6
    Membre actif
    Profil pro
    Inscrit en
    Octobre 2003
    Messages
    502
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2003
    Messages : 502
    Points : 227
    Points
    227
    Par défaut
    salut,

    j'ai reussi l'installation de flight gear sous suse linux, mais ho la la :

    effectivement tu as raison j'ai du telecharger et installer les nouvelles librairies de l'openal 0.0.8 ainsi que les librairies freealut 1.1.0.

    lors de la compilation je n'ai pas eu de probleme
    mais il y a eu un autre probleme celui de la librairie de freeglut : lorsque je lancer le programme il y avait une erreur initialisation de glut ,j'ai donc chercher un peu sur le net et j'ai pu constater qu'il fallait remplacer la version freeglut 2.4 a la version freeglut 2.2 a cause des bugs de la librairie de la version 2.4 puis hop ça fonctionne !

    je te remercie beaucoup pour ton aide .

  7. #7
    Futur Membre du Club
    Inscrit en
    Mars 2007
    Messages
    9
    Détails du profil
    Informations forums :
    Inscription : Mars 2007
    Messages : 9
    Points : 7
    Points
    7
    Par défaut
    Salut.
    J'essaye de compiler aussi simgear pour fedora et je suis bloqué à :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    simgear/sound/openal_test1.cxx:120: référence indéfinie vers « alutCreateBufferFromFile »
    Comment as tu résolu ton problème.
    Je précise, je débute pour ce qui concerne la compilation.
    Merci.

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

Discussions similaires

  1. Probleme de compilation d'ETHEREAL sous Windows
    Par beb30 dans le forum Développement
    Réponses: 6
    Dernier message: 16/02/2009, 16h26
  2. Probleme de compilation de NxOgre sous Linux
    Par bachir006 dans le forum Ogre
    Réponses: 0
    Dernier message: 25/09/2008, 01h13
  3. Problème avec myODBC et odbc sous linux avec unixODBC
    Par tytyi11 dans le forum Administration système
    Réponses: 2
    Dernier message: 18/11/2005, 16h08
  4. Problème configuration d'une passerelle sous linux
    Par DiabolOFraisecoca dans le forum Réseau
    Réponses: 5
    Dernier message: 18/11/2005, 09h05
  5. Problemes de compilation avec g++ sous linux
    Par Selimmel dans le forum Autres éditeurs
    Réponses: 3
    Dernier message: 19/09/2003, 13h43

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