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

Systèmes de compilation Discussion :

Makefile avec 10 classes = galère :/


Sujet :

Systèmes de compilation

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Mars 2015
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 33
    Localisation : France, Gard (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Mars 2015
    Messages : 1
    Points : 1
    Points
    1
    Par défaut Makefile avec 10 classes = galère :/
    Bonjour,

    Pour un projet de client serveur implémenter en C++, je dois faire un makefile pour créer les deux exécutables client et server sur le serveur de l'université.


    j'ai les fichier suivants:

    Exception.cpp
    Exception.h

    TcpSocket.cpp
    TcpSocket.h

    UdpSocketServer.cpp
    UdpSocketServer.h

    UdpSocketClient.cpp
    UdpSocketClient.h

    CommandParser.cpp
    CommandParser.h

    Distrib2015Protocol.cpp
    Distrib2015Protocol.h

    Distrib2015ClientSession.cpp
    Distrib2015ClientSession.h

    Distrib2015Client.cpp
    Distrib2015Client.h

    Distrib2015Session.cpp
    Distrib2015Session.h

    Distrib2015Server.cpp
    Distrib2015Server.h

    server.cpp
    client.cpp

    j'ai les erreurs suivantes, je ne comprend pas.
    merci par avance

    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
     
     
    make
    g++ -Wall -Wextra -pedantic  -I/usr/local/lang/nettle-3.0/include -c client.cpp -o client.o -lnettle -L/usr/local/lang/nettle-3.0/lib64 -Wl,-rpath,/usr/local/lang/nettle-3.0/lib64
    g++ -Wall -Wextra -pedantic  -I/usr/local/lang/nettle-3.0/include -c Distrib2015ClientSession.cpp -o Distrib2015ClientSession.o -lnettle -L/usr/local/lang/nettle-3.0/lib64 -Wl,-rpath,/usr/local/lang/nettle-3.0/lib64
    Distrib2015ClientSession.cpp: In member function ‘char* Distrib2015ClientSession::constructUdpQuery(uint32_t, char)’:
    Distrib2015ClientSession.cpp:38:30: attention : grand entier implicitement tronqué pour un type non signé [-Woverflow]
      query->TID = htons ( 234567 );
                                  ^
    Distrib2015ClientSession.cpp: In member function ‘void Distrib2015ClientSession::start()’:
    Distrib2015ClientSession.cpp:178:9: attention : unused variable ‘frameTosend’ [-Wunused-variable]
       char* frameTosend = protocol ->constructFrame( commandA2, 66, mode );
             ^
    g++ -Wall -Wextra -pedantic  -I/usr/local/lang/nettle-3.0/include -c Distrib2015Client.cpp -o Distrib2015Client.o -lnettle -L/usr/local/lang/nettle-3.0/lib64 -Wl,-rpath,/usr/local/lang/nettle-3.0/lib64
    Distrib2015Client.cpp: In member function ‘int std::Distrib2015Client::conn(std::string, int)’:
    Distrib2015Client.cpp:34:36: attention : comparaison entre des expressions entières signée et non signée [-Wsign-compare]
          if(inet_addr(address.c_str()) == -1)
                                        ^
    g++ -Wall -Wextra -pedantic  -I/usr/local/lang/nettle-3.0/include -c CommandParser.cpp -o CommandParser.o -lnettle -L/usr/local/lang/nettle-3.0/lib64 -Wl,-rpath,/usr/local/lang/nettle-3.0/lib64
    g++ -Wall -Wextra -pedantic  -I/usr/local/lang/nettle-3.0/include client.o Distrib2015ClientSession.o Distrib2015Client.o CommandParser.o -o client  -lnettle -L/usr/local/lang/nettle-3.0/lib64 -Wl,-rpath,/usr/local/lang/nettle-3.0/lib64
    Distrib2015ClientSession.o: In function `Distrib2015ClientSession::constructUdpQuery(unsigned int, char)':
    Distrib2015ClientSession.cpp:(.text+0x3f1): undefined reference to `Distrib2015Protocol::HMACSHA256(unsigned char const*, unsigned int, char const*)'
    Distrib2015ClientSession.o: In function `Distrib2015ClientSession::start()':
    Distrib2015ClientSession.cpp:(.text+0x5e4): undefined reference to `TcpSocket::TcpSocket(int)'
    Distrib2015ClientSession.cpp:(.text+0x604): undefined reference to `Distrib2015Protocol::Distrib2015Protocol()'
    Distrib2015ClientSession.cpp:(.text+0x693): undefined reference to `Distrib2015Protocol::constructCommand(int, char, std::string, unsigned int, std::string)'
    Distrib2015ClientSession.cpp:(.text+0x703): undefined reference to `Distrib2015Protocol::constructFrame(char const*, int, char)'
    Distrib2015ClientSession.cpp:(.text+0x739): undefined reference to `TcpSocket::sentData(char*, int)'
    Distrib2015ClientSession.cpp:(.text+0x76d): undefined reference to `TcpSocket::receiveData(int)'
    Distrib2015ClientSession.cpp:(.text+0x866): undefined reference to `Distrib2015Protocol::constructCommand(int, char, std::string, unsigned int, std::string)'
    Distrib2015ClientSession.cpp:(.text+0x8c3): undefined reference to `Distrib2015Protocol::constructFrame(char const*, int, char)'
    Distrib2015ClientSession.cpp:(.text+0x8e6): undefined reference to `TcpSocket::sentData(char*, int)'
    Distrib2015ClientSession.cpp:(.text+0x91a): undefined reference to `TcpSocket::receiveData(int)'
    Distrib2015ClientSession.cpp:(.text+0xac5): undefined reference to `UdpSocketClient::UdpSocketClient(int, std::string)'
    Distrib2015ClientSession.cpp:(.text+0xba2): undefined reference to `UdpSocketClient::sentData(char const*, int)'
    Distrib2015ClientSession.cpp:(.text+0xbe5): undefined reference to `UdpSocketClient::receivedData(int)'
    Distrib2015ClientSession.cpp:(.text+0xd94): undefined reference to `Distrib2015Protocol::constructCommand(int, char, std::string, unsigned int, std::string)'
    Distrib2015ClientSession.cpp:(.text+0xe00): undefined reference to `Distrib2015Protocol::constructFrame(char const*, int, char)'
    Distrib2015ClientSession.cpp:(.text+0xe23): undefined reference to `TcpSocket::sentData(char*, int)'
    Distrib2015ClientSession.cpp:(.text+0xe57): undefined reference to `TcpSocket::receiveData(int)'
    Distrib2015ClientSession.cpp:(.text+0x1005): undefined reference to `UdpSocketClient::UdpSocketClient(int, std::string)'
    Distrib2015ClientSession.cpp:(.text+0x10e2): undefined reference to `UdpSocketClient::sentData(char const*, int)'
    Distrib2015ClientSession.cpp:(.text+0x1125): undefined reference to `UdpSocketClient::receivedData(int)'
    Distrib2015ClientSession.cpp:(.text+0x127c): undefined reference to `typeinfo for ProtocolException'
    Distrib2015ClientSession.o: In function `ProtocolException::ProtocolException(std::string)':
    Distrib2015ClientSession.cpp:(.text._ZN17ProtocolExceptionC2ESs[_ZN17ProtocolExceptionC5ESs]+0x33): undefined reference to `Exception::Exception(std::string)'
    Distrib2015ClientSession.cpp:(.text._ZN17ProtocolExceptionC2ESs[_ZN17ProtocolExceptionC5ESs]+0x4a): undefined reference to `vtable for ProtocolException'
    Distrib2015ClientSession.o: In function `ProtocolException::~ProtocolException()':
    Distrib2015ClientSession.cpp:(.text._ZN17ProtocolExceptionD2Ev[_ZN17ProtocolExceptionD5Ev]+0x13): undefined reference to `vtable for ProtocolException'
    Distrib2015ClientSession.cpp:(.text._ZN17ProtocolExceptionD2Ev[_ZN17ProtocolExceptionD5Ev]+0x1f): undefined reference to `Exception::~Exception()'
    CommandParser.o: In function `CommandParser::commandLineParsingServer(int, char**)':
    CommandParser.cpp:(.text+0x8d): undefined reference to `typeinfo for ParsingException'
    CommandParser.cpp:(.text+0x1c8): undefined reference to `typeinfo for ParsingException'
    CommandParser.o: In function `CommandParser::commandLineParsingClient(int, char**)':
    CommandParser.cpp:(.text+0x361): undefined reference to `typeinfo for ParsingException'
    CommandParser.cpp:(.text+0x522): undefined reference to `typeinfo for ParsingException'
    CommandParser.o: In function `ParsingException::ParsingException(std::string)':
    CommandParser.cpp:(.text._ZN16ParsingExceptionC2ESs[_ZN16ParsingExceptionC5ESs]+0x33): undefined reference to `Exception::Exception(std::string)'
    CommandParser.cpp:(.text._ZN16ParsingExceptionC2ESs[_ZN16ParsingExceptionC5ESs]+0x4a): undefined reference to `vtable for ParsingException'
    CommandParser.o: In function `ParsingException::~ParsingException()':
    CommandParser.cpp:(.text._ZN16ParsingExceptionD2Ev[_ZN16ParsingExceptionD5Ev]+0x13): undefined reference to `vtable for ParsingException'
    CommandParser.cpp:(.text._ZN16ParsingExceptionD2Ev[_ZN16ParsingExceptionD5Ev]+0x1f): undefined reference to `Exception::~Exception()'
    collect2: erreur: ld a retourné 1 code d'état d'exécution
    make: *** [client] Erreur 1
    [derrouic@pikkukorppi ~/Desktop/Socket_programming]$
    Fichiers attachés Fichiers attachés

  2. #2
    Responsable 2D/3D/Jeux


    Avatar de LittleWhite
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Mai 2008
    Messages
    26 859
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Mai 2008
    Messages : 26 859
    Points : 218 580
    Points
    218 580
    Billets dans le blog
    120
    Par défaut
    Bonjour,

    Lors de la compilation du client, il manque d'intégrer le TcpSocket.o à la règle pour que le fichier soit prit en compte.
    Vous souhaitez participer à la rubrique 2D/3D/Jeux ? Contactez-moi

    Ma page sur DVP
    Mon Portfolio

    Qui connaît l'erreur, connaît la solution.

Discussions similaires

  1. Utilisation iterator avec une classe perso
    Par SteelBox dans le forum C++
    Réponses: 19
    Dernier message: 07/03/2005, 11h30
  2. Réponses: 7
    Dernier message: 05/10/2004, 13h44
  3. [C#][WebServices] Appel methode avec une classe en paramètre
    Par bran_noz dans le forum Windows Forms
    Réponses: 6
    Dernier message: 10/09/2004, 16h41
  4. Réponses: 1
    Dernier message: 18/06/2004, 01h12
  5. [Débutant][Conception] Erreur avec une classe interne
    Par Devil Redneck dans le forum Général Java
    Réponses: 5
    Dernier message: 11/06/2004, 15h45

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