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

C++ Discussion :

Probleme de compilation : fonction manquante.


Sujet :

C++

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    88
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Mars 2007
    Messages : 88
    Points : 57
    Points
    57
    Par défaut Probleme de compilation : fonction manquante.
    Bien le bonjour

    Exposer du problème :

    Donc j'ai fait un petit programme ou je me sers de librairies ltilib. La je finis donc le programme et je me dis : pas très propre tout ca, je vais donné une interface plus orienté objet. L'ennui, c'est que j'ai ce gros problème dans ma console alors :

    /home/chris/ltilib/src/math/ltiGenericVector_template.h: In member function ‘bool lti::genericVector<T>::write(lti::ioHandler&, bool) const [with T = lti::rgbPixel]’:
    MatrixCompute.cpp:200: instantiated from here
    /home/chris/ltilib/src/math/ltiGenericVector_template.h:834: error: no matching function for call to ‘write(lti::ioHandler&, const lti::rgbPixel&)’
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:493: note: candidates are: bool lti::write(lti::ioHandler&, const std::string&)
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:494: note: bool lti::write(lti::ioHandler&, const char*)
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:495: note: bool lti::write(lti::ioHandler&, const double&)
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:496: note: bool lti::write(lti::ioHandler&, const float&)
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:497: note: bool lti::write(lti::ioHandler&, const int&)
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:498: note: bool lti::write(lti::ioHandler&, const unsigned int&)
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:499: note: bool lti::write(lti::ioHandler&, const char&)
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:500: note: bool lti::write(lti::ioHandler&, const lti::byte&)
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:501: note: bool lti::write(lti::ioHandler&, const lti::ubyte&)
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:502: note: bool lti::write(lti::ioHandler&, const bool&)
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:503: note: bool lti::write(lti::ioHandler&, const long int&)
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:504: note: bool lti::write(lti::ioHandler&, const long unsigned int&)
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:505: note: bool lti::write(lti::ioHandler&, const short int&)
    /home/chris/ltilib/src/ioBasics/ltiIoHandler.h:506: note: bool lti::write(lti::ioHandler&, const short unsigned int&)
    /home/chris/ltilib/src/ioBasics/ltiIoObject.h:136: note: bool lti::write(lti::ioHandler&, const lti::ioObject&, bool)
    /home/chris/ltilib/src/basics/ltiFunctor.h:483: note: bool lti::write(lti::ioHandler&, const lti::functor::parameters&, bool)
    /home/chris/ltilib/src/basics/ltiFunctor.h:501: note: bool lti::write(lti::ioHandler&, const lti::functor&, bool)
    /home/chris/ltilib/src/math/ltiMathObject.h:90: note: bool lti::write(lti::ioHandler&, const lti::mathObject&, bool)

    .....
    je vous épargne la suite, mais c'est du même accabits.

    la ligne 200 de MatrixCompute est l'avant derniere ligne du fichié, c'est la derniere ligne de code avant le " } " de fin de fonction.

    Je ne vois pas d'ou viens l'erreur, car tout l'ensemble marché bien dans le fichier initial. Le seul moyen pour que la compilation passe, c'est de vidé le fichier MatrixCompute. J'ai bien remis les headers je pense, car j'ai repris tout les headers initiaux.

    Help me plzzzz ^^

  2. #2
    Rédacteur

    Avatar de Matthieu Brucher
    Profil pro
    Développeur HPC
    Inscrit en
    Juillet 2005
    Messages
    9 810
    Détails du profil
    Informations personnelles :
    Âge : 42
    Localisation : France, Pyrénées Atlantiques (Aquitaine)

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

    Informations forums :
    Inscription : Juillet 2005
    Messages : 9 810
    Points : 20 970
    Points
    20 970
    Par défaut
    C'est clair, il peut prendre beaucoup de choses en paramètre, mais pas un std::string. Par exemple un const char*, auquel cas tu appelles simplement la fonction c_str() sur ta chaîne.

  3. #3
    Membre actif Avatar de Rupella
    Inscrit en
    Février 2005
    Messages
    286
    Détails du profil
    Informations forums :
    Inscription : Février 2005
    Messages : 286
    Points : 257
    Points
    257
    Par défaut
    je pense que c'est relativement clair...

    tu utilises la fonction bool lti::genericVector<T>::write(lti::ioHandler&, bool) en spécifiant un template qui est un lti::rgbPixel.

    Sauf que cette fonction doit faire un appel à une fonction bool lti::write(lti::ioHandler&, ...) et tout un tas de possibilités quant au type du deuxième paramètre.... sauf qu'il ne sais pas faire de lien entre un lti::rbgPixel et un des types pour lesquels l'appel est défini...

    donc, je pense qu'il faut que tu passes par un autre type de données qu'un rgbPixel pour faire ton opération...

    après, je peux me tromper

  4. #4
    Membre du Club
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    88
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Mars 2007
    Messages : 88
    Points : 57
    Points
    57
    Par défaut
    le hic, c'est que je ne fais pas appel moi même à cette fonction, c'est une fonction de la librairire de math que j'appelle. Mais c'est un bete copier coller du fichier initial que je fais juste ou tout marche :s

    je ne me sers nul part de rgb pixel c'est ca le plus etrange :s j'utilise des lti::point et j'ai pas vu de lien entre eux

  5. #5
    Membre actif Avatar de Rupella
    Inscrit en
    Février 2005
    Messages
    286
    Détails du profil
    Informations forums :
    Inscription : Février 2005
    Messages : 286
    Points : 257
    Points
    257
    Par défaut
    tu peux poster un code avec ce que tu appelles, les variables utilisées ainsi que leur type ?

  6. #6
    Membre du Club
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    88
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Mars 2007
    Messages : 88
    Points : 57
    Points
    57
    Par défaut
    Merci mais je l'ai résolu, c'etait un probleme au niveaux des includes finallement^^

    tx all

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

Discussions similaires

  1. Probleme de compilation (pointeur et fonction)
    Par deadbone dans le forum Débuter
    Réponses: 14
    Dernier message: 24/03/2008, 14h06
  2. Réponses: 6
    Dernier message: 08/12/2006, 14h59
  3. [TP]Probleme de compilation sous TP7
    Par yffick dans le forum Turbo Pascal
    Réponses: 7
    Dernier message: 18/12/2003, 20h32
  4. Problemes de compilation avec g++ sous linux
    Par Selimmel dans le forum Autres éditeurs
    Réponses: 3
    Dernier message: 19/09/2003, 13h43
  5. autre probleme pour deriver fonction
    Par voyageur dans le forum Mathématiques
    Réponses: 15
    Dernier message: 28/07/2003, 14h37

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