Forum Programmation.c++ Probleme : compilation d'un petit programme

Posté par  .
Étiquettes : aucune
0
9
nov.
2004
Bonjour,

Je viens de telecharger un petit programme "inetquota" pour gerer les quotas de connexion internet pour des utilisateurs du réseau. J'ai tout bien installé le compilateur c++ et ce qui va avec.
Le problème c'est que j'ai des erreurs (pleins) de compilation. Pourtant le programme est connu et hebergé sur sourceforge (devrait fonctionner).
Reférence : http://horde.planetmirror.com/pub/sf/i/in/inetquota/(...)

Me manque t-il une dépendence ou bien le prog marche pas...
Si une personne pouvait me renseigner.

Merci beaucoup
  • # principe

    Posté par  . Évalué à 4.

    tu dois partir du principe que le createur de ce programme ne fait pas intervenir des forces extraterestres , et donc que le pb est chez toi et pas ailleur.

    Donc si tu veux de l'aide, il faut nous montrer ce que tu obtient comme erreurs.
    • [^] # log d'erreur un peu long :-(

      Posté par  . Évalué à 1.

      Dans le fichier inclus à partir de /usr/include/c++/3.3/backward/strstream:51,
      à partir de UserEntry.h:17,
      à partir de UserEntry.cpp:9:
      /usr/include/c++/3.3/backward/backward_warning.h:32:2: attention : #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the <X.h> header for C++ includes, or instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
      In file included from UserEntry.h:21,
      from UserEntry.cpp:9:
      global.h:19: error: `LogFile&log' redeclared as different kind of symbol
      /usr/include/bits/mathcalls.h:110: error: previous declaration of `double
      log(double)'
      In file included from UserEntry.cpp:9:
      UserEntry.h:50: error: 'string' is used as a type, but is not defined as a
      type.
      UserEntry.h:58: error: 'string' is used as a type, but is not defined as a
      type.
      UserEntry.h:59: error: 'string' is used as a type, but is not defined as a
      type.
      UserEntry.h:74: error: erreur d'analyse syntaxique before `&' token
      UserEntry.h:79: error: erreur d'analyse syntaxique before `&' token
      UserEntry.h:89: error: erreur d'analyse syntaxique before `&' token
      UserEntry.h:90: error: le C++ ISO interdit la déclaration de « string » sans
      type
      UserEntry.h:90: error: erreur d'analyse syntaxique before `&' token
      UserEntry.h:107: error: le C++ ISO interdit la déclaration de « string » sans
      type
      UserEntry.h:107: error: declaration of `const int UserEntry::string'
      UserEntry.h:90: error: conflicts with previous declaration `const int
      UserEntry::string'
      UserEntry.h:107: error: erreur d'analyse syntaxique before `&' token
      UserEntry.h:111: error: erreur d'analyse syntaxique before `&' token
      UserEntry.h:112: error: erreur d'analyse syntaxique before `&' token
      UserEntry.h:115: error: erreur d'analyse syntaxique before `&' token
      UserEntry.h:116: error: erreur d'analyse syntaxique before `&' token
      UserEntry.h:120: error: le C++ ISO interdit la déclaration de « string » sans
      type
      UserEntry.h:120: error: declaration of `const int UserEntry::string'
      UserEntry.h:90: error: conflicts with previous declaration `const int
      UserEntry::string'
      UserEntry.h:120: error: erreur d'analyse syntaxique before `(' token
      In file included from ../connectmgr/ConnectMgr.h:26,
      from ../connectmgr/ScriptMgr.h:14,
      from UserEntry.cpp:10:
      UserDb.h:20: error: erreur d'analyse syntaxique before `<' token
      UserDb.h:27: error: erreur d'analyse syntaxique before `&' token
      UserDb.h:28: error: destructors must be member functions
      UserDb.h:31: error: erreur de syntaxe before `*' token
      UserDb.h:35: error: erreur d'analyse syntaxique before `&' token
      UserDb.h:50: error: erreur de syntaxe before `(' token
      In file included from ../connectmgr/ScriptMgr.h:14,
      from UserEntry.cpp:10:
      ../connectmgr/ConnectMgr.h:33: error: le C++ ISO interdit la déclaration de «
      string » sans type
      ../connectmgr/ConnectMgr.h:33: error: `string' declared as a `virtual' field
      ../connectmgr/ConnectMgr.h:33: error: erreur d'analyse syntaxique before `&'
      token
      ../connectmgr/ConnectMgr.h:34: error: le C++ ISO interdit la déclaration de «
      string » sans type
      ../connectmgr/ConnectMgr.h:34: error: `string' declared as a `virtual' field
      ../connectmgr/ConnectMgr.h:34: error: declaration of `const int
      ConnectionMgr::string'
      ../connectmgr/ConnectMgr.h:33: error: conflicts with previous declaration `
      const int ConnectionMgr::string'
      ../connectmgr/ConnectMgr.h:34: error: erreur d'analyse syntaxique before `&'
      token
      ../connectmgr/ConnectMgr.h:35: error: le C++ ISO interdit la déclaration de «
      string » sans type
      ../connectmgr/ConnectMgr.h:35: error: `string' declared as a `virtual' field
      ../connectmgr/ConnectMgr.h:35: error: declaration of `const int
      ConnectionMgr::string'
      ../connectmgr/ConnectMgr.h:33: error: conflicts with previous declaration `
      const int ConnectionMgr::string'
      ../connectmgr/ConnectMgr.h:35: error: erreur d'analyse syntaxique before `&'
      token
      ../connectmgr/ConnectMgr.h:36: error: le C++ ISO interdit la déclaration de «
      string » sans type
      ../connectmgr/ConnectMgr.h:36: error: `string' declared as a `virtual' field
      ../connectmgr/ConnectMgr.h:36: error: declaration of `const int
      ConnectionMgr::string'
      ../connectmgr/ConnectMgr.h:33: error: conflicts with previous declaration `
      const int ConnectionMgr::string'
      ../connectmgr/ConnectMgr.h:36: error: erreur d'analyse syntaxique before `&'
      token
      ../connectmgr/ConnectMgr.h: Dans constructor « ConnectionMgr::ConnectionMgr()
      »:
      ../connectmgr/ConnectMgr.h:30: error: uninitialized member '
      ConnectionMgr::string' with 'const' type 'const int'
      In file included from UserEntry.cpp:10:
      ../connectmgr/ScriptMgr.h: At global scope:
      ../connectmgr/ScriptMgr.h:27: error: 'string' is used as a type, but is not
      defined as a type.
      ../connectmgr/ScriptMgr.h:33: error: le C++ ISO interdit la déclaration de «
      string » sans type
      ../connectmgr/ScriptMgr.h:33: error: erreur d'analyse syntaxique before `&'
      token
      ../connectmgr/ScriptMgr.h:34: error: le C++ ISO interdit la déclaration de «
      string » sans type
      ../connectmgr/ScriptMgr.h:34: error: declaration of `const int
      ScriptMgr::string'
      ../connectmgr/ScriptMgr.h:33: error: conflicts with previous declaration `const
      int ScriptMgr::string'
      ../connectmgr/ScriptMgr.h:34: error: erreur d'analyse syntaxique before `&'
      token
      ../connectmgr/ScriptMgr.h:35: error: le C++ ISO interdit la déclaration de «
      string » sans type
      ../connectmgr/ScriptMgr.h:35: error: declaration of `const int
      ScriptMgr::string'
      ../connectmgr/ScriptMgr.h:33: error: conflicts with previous declaration `const
      int ScriptMgr::string'
      ../connectmgr/ScriptMgr.h:35: error: erreur d'analyse syntaxique before `&'
      token
      ../connectmgr/ScriptMgr.h:36: error: le C++ ISO interdit la déclaration de «
      string » sans type
      ../connectmgr/ScriptMgr.h:36: error: declaration of `const int
      ScriptMgr::string'
      ../connectmgr/ScriptMgr.h:33: error: conflicts with previous declaration `const
      int ScriptMgr::string'
      ../connectmgr/ScriptMgr.h:36: error: erreur d'analyse syntaxique before `&'
      token
      UserEntry.cpp: Dans constructor « UserEntry::UserEntry() »:
      UserEntry.cpp:19: error: uninitialized member 'UserEntry::string' with 'const'
      type 'const int'
      UserEntry.cpp:22: error: `machine' undeclared (first use this function)
      UserEntry.cpp:22: error: (Each undeclared identifier is reported only once for
      each function it appears in.)
      UserEntry.cpp: At global scope:
      UserEntry.cpp:26: error: erreur d'analyse syntaxique before `&' token
      UserEntry.cpp:31: error: `name' was not declared in this scope
      UserEntry.cpp:31: error: le C++ ISO interdit la déclaration de « assert » sans
      type
      UserEntry.cpp:31: error: `int UserEntry::assert' is not a static member of `
      class UserEntry'
      UserEntry.cpp:32: error: `name' was not declared in this scope
      UserEntry.cpp:32: error: le C++ ISO interdit la déclaration de « setName » sans
      type
      UserEntry.cpp:32: error: `int UserEntry::setName' is not a static member of `
      class UserEntry'
      UserEntry.cpp:33: error: `time_available' was not declared in this scope
      UserEntry.cpp:33: error: le C++ ISO interdit la déclaration de «
      setTimeAvailable » sans type
      UserEntry.cpp:33: error: `int UserEntry::setTimeAvailable' is not a static
      member of `class UserEntry'
      UserEntry.cpp:34: error: `time_use' was not declared in this scope
      UserEntry.cpp:34: error: le C++ ISO interdit la déclaration de « setTimeUse »
      sans type
      UserEntry.cpp:34: error: `int UserEntry::setTimeUse' is not a static member of
      `class UserEntry'
      UserEntry.cpp:35: error: `active' was not declared in this scope
      UserEntry.cpp:35: error: le C++ ISO interdit la déclaration de « setActive »
      sans type
      UserEntry.cpp:35: error: `int UserEntry::setActive' is not a static member of `
      class UserEntry'
      UserEntry.cpp:36: error: `unlimited' was not declared in this scope
      UserEntry.cpp:36: error: le C++ ISO interdit la déclaration de « setUnlimited »
      sans type
      UserEntry.cpp:36: error: `int UserEntry::setUnlimited' is not a static member
      of `class UserEntry'
      UserEntry.cpp:37: error: `only_count' was not declared in this scope
      UserEntry.cpp:37: error: le C++ ISO interdit la déclaration de « setOnlyCount »
      sans type
      UserEntry.cpp:37: error: `int UserEntry::setOnlyCount' is not a static member
      of `class UserEntry'
      UserEntry.cpp:38: error: `pass' was not declared in this scope
      UserEntry.cpp:38: error: le C++ ISO interdit la déclaration de « setPassword »
      sans type
      UserEntry.cpp:38: error: `int UserEntry::setPassword' is not a static member of
      `class UserEntry'
      UserEntry.cpp:39: error: le C++ ISO interdit la déclaration de « script » sans
      type
      UserEntry.cpp:39: error: `int UserEntry::script' is not a static member of `
      class UserEntry'
      UserEntry.cpp:39: attention : converting to non-pointer type `int' from NULL
      UserEntry.cpp:40: error: erreur d'analyse syntaxique before `}' token
      UserEntry.cpp: Dans copy constructor « UserEntry::UserEntry(const UserEntry&)
      »:
      UserEntry.cpp:43: error: uninitialized member 'UserEntry::string' with 'const'
      type 'const int'
      UserEntry.cpp:45: error: `getName' undeclared (first use this function)
      UserEntry.cpp:51: error: 'const class UserEntry' has no member named 'password'
      UserEntry.cpp: At global scope:
      UserEntry.cpp:61: error: erreur d'analyse syntaxique before `&' token
      UserEntry.cpp: Dans member function « bool UserEntry::nameIsValid(...) const »:
      UserEntry.cpp:63: error: `string' undeclared (first use this function)
      UserEntry.cpp:63: error: erreur d'analyse syntaxique before `=' token
      UserEntry.cpp:66: error: `s' undeclared (first use this function)
      UserEntry.cpp:69: error: `it' undeclared (first use this function)
      UserEntry.cpp: At global scope:
      UserEntry.cpp:82: error: erreur d'analyse syntaxique before `&' token
      UserEntry.cpp: Dans member function « void UserEntry::setName(...) »:
      UserEntry.cpp:84: error: `assert' undeclared (first use this function)
      UserEntry.cpp:85: error: `name' undeclared (first use this function)
      UserEntry.cpp:89: error: `cerr' undeclared (first use this function)
      UserEntry.cpp:89: error: `endl' undeclared (first use this function)
      UserEntry.cpp:94: error: `userName' undeclared (first use this function)
      UserEntry.cpp: At global scope:
      UserEntry.cpp:98: error: erreur de syntaxe before `&' token
      UserEntry.cpp: Dans member function « void UserEntry::setTimeAvailable(long
      unsigned int) »:
      UserEntry.cpp:106: error: `assert' undeclared (first use this function)
      UserEntry.cpp: Dans member function « long unsigned int
      UserEntry::getTimeAvailable() const »:
      UserEntry.cpp:112: error: `assert' undeclared (first use this function)
      UserEntry.cpp: Dans member function « void UserEntry::setTimeUse(long unsigned
      int) »:
      UserEntry.cpp:118: error: `assert' undeclared (first use this function)
      UserEntry.cpp: Dans member function « long unsigned int UserEntry::getTimeUse()
      const »:
      UserEntry.cpp:125: error: `assert' undeclared (first use this function)
      UserEntry.cpp: Dans member function « void UserEntry::setActive(bool) »:
      UserEntry.cpp:131: error: `assert' undeclared (first use this function)
      UserEntry.cpp: Dans member function « bool UserEntry::getActive() const »:
      UserEntry.cpp:137: error: `assert' undeclared (first use this function)
      UserEntry.cpp: Dans member function « void UserEntry::setUnlimited(bool) »:
      UserEntry.cpp:143: error: `assert' undeclared (first use this function)
      UserEntry.cpp: Dans member function « bool UserEntry::getUnlimited() const »:
      UserEntry.cpp:149: error: `assert' undeclared (first use this function)
      UserEntry.cpp: Dans member function « void UserEntry::setOnlyCount(bool) »:
      UserEntry.cpp:155: error: `assert' undeclared (first use this function)
      UserEntry.cpp: Dans member function « bool UserEntry::getOnlyCount() const »:
      UserEntry.cpp:161: error: `assert' undeclared (first use this function)
      UserEntry.cpp: At global scope:
      UserEntry.cpp:165: error: erreur de syntaxe before `&' token
      UserEntry.cpp:180: error: erreur d'analyse syntaxique before `&' token
      UserEntry.cpp: Dans member function « void UserEntry::setPassword(...) »:
      UserEntry.cpp:182: error: `password' undeclared (first use this function)
      UserEntry.cpp:182: error: `newpassword' undeclared (first use this function)
      UserEntry.cpp: At global scope:
      UserEntry.cpp:185: error: erreur d'analyse syntaxique before `&' token
      UserEntry.cpp: Dans member function « bool UserEntry::checkPassword(...) const
      »:
      UserEntry.cpp:187: error: `userpass' undeclared (first use this function)
      UserEntry.cpp: At global scope:
      UserEntry.cpp:195: error: erreur d'analyse syntaxique before `&' token
      UserEntry.cpp: Dans member function « UserEntry::EError UserEntry::connect(...)
      »:
      UserEntry.cpp:209: error: `m' undeclared (first use this function)
      UserEntry.cpp: At global scope:
      UserEntry.cpp:218: error: erreur d'analyse syntaxique before `&' token
      UserEntry.cpp:244: error: erreur de syntaxe before `::' token
      UserEntry.cpp:247: error: 'ostrstream' is used as a type, but is not defined as
      a type.
      UserEntry.cpp:248: error: erreur de syntaxe before `<<' token
      UserEntry.cpp:249: error: erreur de syntaxe before `<<' token
      UserEntry.cpp:250: error: erreur de syntaxe before `<<' token
      UserEntry.cpp:251: error: erreur de syntaxe before `<<' token
      UserEntry.cpp:253: error: erreur de syntaxe before `<<' token
      UserEntry.cpp:254: error: le C++ ISO interdit la déclaration de « s » sans type
      UserEntry.cpp:254: error: `int UserEntry::s' is not a static member of `class
      UserEntry'
      UserEntry.cpp:254: error: request for member `str' in `buffer', which is of
      non-aggregate type `char*'
      UserEntry.cpp:255: error: erreur de syntaxe before `.' token
      UserEntry.cpp:256: error: erreur de syntaxe before `<<' token
      UserEntry.cpp:257: error: erreur de syntaxe before `<<' token
      make[2]: *** [UserEntry.o] Erreur 1
      make[2]: quittant le répertoire « /home/user1/inetquota-2.0/db »
      make[1]: *** [all-recursive] Erreur 1
      make[1]: quittant le répertoire « /home/user1/inetquota-2.0 »
      make: *** [all-recursive-am] Erreur 2
      user1@zorro ~/inetquota-2.0 $

Suivre le flux des commentaires

Note : les commentaires appartiennent à celles et ceux qui les ont postés. Nous n’en sommes pas responsables.