Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2923 connectés 

  FORUM HardWare.fr
  Programmation
  C++

  [C++] Problème de compilation d'une appli en C++

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[C++] Problème de compilation d'une appli en C++

n°154365
joce
Architecte / Développeur principal
"BugHunter"
Posté le 08-06-2002 à 18:42:05  profilanswer
 

Voici les erreurs affichées :

Code :
  1. gcc -g -O2 -fno-rtti -fno-exceptions -Wall -W  -o authvmailmgr  authvmailmgr.o authvlib.o ../lib/libvmailmgr.a -L../lib/courier-authlib -lauthmod -lcrypt
  2. authvlib.o: In function `set_user(pwentry const*)':
  3. /home/admin/vmailmgr-0.96.9/authenticate/authvlib.cc:56: undefined reference to `operator new(unsigned)'
  4. /home/admin/vmailmgr-0.96.9/authenticate/authvlib.cc:59: undefined reference to `operator delete(void*)'
  5. authvlib.o: In function `check(mystring, mystring, bool)':
  6. /home/admin/vmailmgr-0.96.9/authenticate/authvlib.cc:81: undefined reference to `operator new(unsigned)'
  7. /home/admin/vmailmgr-0.96.9/authenticate/authvlib.cc:93: undefined reference to `operator new(unsigned)'
  8. authvlib.o: In function `check(mystring, mystring, bool)':
  9. <cut>
  10. La fonction en question avec la ligne qui merdouille :
  11. void set_user(const pwentry* pw)
  12. {
  13.   pw->export_env();
  14.   if(!!exec_presetuid && execute(exec_presetuid))
  15.     fail_temporary("Execution of presetuid failed" );
  16.   if(setgid(pw->gid) == -1 ||
  17.      setuid(pw->uid) == -1 ||
  18.      chdir(pw->home.c_str()) == -1)
  19.     fail_temporary("Bad user data in password file" );
  20.   domain = new vdomain(*pw);
  21.   config = &domain->config;
  22. }
  23. Le header pour la class vdomain :
  24. class vdomain
  25. {
  26. public:
  27.   const mystring subdir;
  28.   const mystring prefix;
  29.   const configuration config;
  30. private:
  31.   vpwtable* ptable;
  32.   // Helper functions for chattr
  33.   response chpass(vpwentry*, mystring);
  34.   response chdest(vpwentry*, mystring);
  35. public:
  36.   vdomain(const pwentry&);
  37.   vdomain(const pwentry&, mystring, mystring, const configuration&);
  38.   ~vdomain();
  39.   vpwtable* table();
  40.   mystring userdir(mystring username) const;
  41.   // Virtual user manipulation functions
  42.   vpwentry* lookup(mystring name, bool nodefault);
  43.   bool exists(mystring name);
  44.   response set(const vpwentry*, bool onlyadd, mystring maildir = "" );
  45.   response chattr(mystring user, unsigned attr, mystring newval);
  46.   response chattr(const vpwentry*, unsigned attr, mystring newval);
  47.   response deluser(mystring name, bool del_mailbox);
  48.   // Virtual user validation functions
  49.   response validate_forward(mystring);
  50.   bool validate_username(mystring) const;
  51.   bool validate_password(mystring) const;
  52.   static const unsigned ATTR_PASS = 1;
  53.   static const unsigned ATTR_DEST = 2;
  54.   static const unsigned ATTR_HARDQUOTA = 3;
  55.   static const unsigned ATTR_SOFTQUOTA = 4;
  56.   static const unsigned ATTR_MSGSIZE = 5;
  57.   static const unsigned ATTR_MSGCOUNT = 6;
  58.   static const unsigned ATTR_EXPIRY = 7;
  59.   static const unsigned ATTR_MAILBOX_ENABLED = 8;
  60.   static const unsigned ATTR_PERSONAL = 9;
  61. };
  62. Le fichier vdomain.cc :
  63. vdomain::vdomain(const pwentry& user)
  64.   : subdir(), prefix(),
  65.     config(&user.config, user.home + "/" LOCAL_CONFIG_DIR),
  66.     ptable(0)
  67. {
  68. }
  69. vdomain::~vdomain()
  70. {
  71. }


Vous auriez une idée de ce qui pourrait causer ca :??:


Message édité par joce le 06-08-2002 à 18:42:40
mood
Publicité
Posté le 08-06-2002 à 18:42:05  profilanswer
 

n°154367
bilgetz_42
Posté le 08-06-2002 à 18:45:27  profilanswer
 

vdomain(const pwentry&) const;
al la place de  
vdomain(const pwentry&);
 
C'est un constructeur pour le objet constant s

n°154368
joce
Architecte / Développeur principal
&#034;BugHunter&#034;
Posté le 08-06-2002 à 18:51:59  profilanswer
 

oki, je teste ca :)

n°154369
joce
Architecte / Développeur principal
&#034;BugHunter&#034;
Posté le 08-06-2002 à 18:52:17  profilanswer
 

Code :
  1. test smilie :) ;)


:) ;)

n°154371
joce
Architecte / Développeur principal
&#034;BugHunter&#034;
Posté le 08-06-2002 à 18:55:29  profilanswer
 

marche pas :/
 
c++ -DHAVE_CONFIG_H -I. -I. -I../.. -I..    -g -O2 -fno-rtti -fno-exceptions -Wall -W -c vdomain.cc
In file included from vdomain.cc:18:
vdomain.h:23: constructors may not be `const'

n°154385
Willyzekid
Posté le 08-06-2002 à 19:13:10  profilanswer
 

t'as quelle version de gcc?
en utilisant g++, blablabla...


---------------
Horizon pas Net, reste à la buvette!!
n°154550
joce
Architecte / Développeur principal
&#034;BugHunter&#034;
Posté le 08-06-2002 à 21:10:28  profilanswer
 

Willyzekid a écrit a écrit :

t'as quelle version de gcc?
en utilisant g++, blablabla...  




 
[root@forum] /home/admin/vmailmgr-0.96.9> c++ --version
c++ (GCC) 3.1
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Message édité par joce le 06-08-2002 à 21:11:06
n°154576
verdoux
And I'm still waiting
Posté le 08-06-2002 à 21:49:43  profilanswer
 

Faut virer le const de l'autre abruti et utiliser g++ et non gcc.

n°154577
Willyzekid
Posté le 08-06-2002 à 21:50:43  profilanswer
 

Verdoux a écrit a écrit :

Faut virer le const de l'autre abruti et utiliser g++ et non gcc.  




 
Mais putain c'est ce que j'ai dit!!! :( :sweat:
 

Willyzekid a écrit a écrit :

t'as quelle version de gcc?
en utilisant g++, blablabla...




 
Bon c'est vrai qu'en relisant, c'est pas clair :D


Message édité par Willyzekid le 06-08-2002 à 21:51:30

---------------
Horizon pas Net, reste à la buvette!!
n°154617
joce
Architecte / Développeur principal
&#034;BugHunter&#034;
Posté le 08-06-2002 à 22:51:51  profilanswer
 

ah vi tient ca marche tout d'un coup :D
 
v allez bidouiller le makefile moa :heink:

mood
Publicité
Posté le 08-06-2002 à 22:51:51  profilanswer
 

n°154619
joce
Architecte / Développeur principal
&#034;BugHunter&#034;
Posté le 08-06-2002 à 22:54:09  profilanswer
 

dans un autre fichier :
 

Code :
  1. void fail(const char* msg, const char* execfile, int code)
  2. {
  3.   presetenv("CHECKVPW_ERROR=", msg);
  4.   execute(execfile);
  5.   exit(code);
  6. }
  7. c++ -DHAVE_CONFIG_H -I. -I. -I..  -I../lib    -g -O2 -fno-rtti -fno-exceptions -Wall -W -c checkvpw.cc
  8. checkvpw.cc: In function `void fail(const char*, const char*, int)':
  9. checkvpw.cc:33: `exit' undeclared (first use this function)
  10. checkvpw.cc:33: (Each undeclared identifier is reported only once for each
  11.    function it appears in.)

n°154622
chrisbk
-
Posté le 08-06-2002 à 22:56:44  profilanswer
 

pour exit, je crois que c'est :  
#include <stdlib.h>

n°154624
Willyzekid
Posté le 08-06-2002 à 22:59:43  profilanswer
 

#include <stdlib.h>


---------------
Horizon pas Net, reste à la buvette!!
n°154625
joce
Architecte / Développeur principal
&#034;BugHunter&#034;
Posté le 08-06-2002 à 22:59:47  profilanswer
 

putain mais il est horrible ce package de vmailmgr, rien n'est standard :/

n°154626
Willyzekid
Posté le 08-06-2002 à 23:00:11  profilanswer
 

chrisbk a écrit a écrit :

pour exit, je crois que c'est :  
#include <stdlib.h>  




 
tu commence a me les brouter toi !!! :D


---------------
Horizon pas Net, reste à la buvette!!
n°154627
chrisbk
-
Posté le 08-06-2002 à 23:02:07  profilanswer
 

Willyzekid a écrit a écrit :

 
 
tu commence a me les brouter toi !!! :D  




 
 
Ecoute, coyote, y'en a un de nous deux qui est de trop ici, et je crois bien que j'etais la avant toi, alors tu vois ce qu'il te reste a faire :D

n°154628
verdoux
And I'm still waiting
Posté le 08-06-2002 à 23:02:50  profilanswer
 

joce a écrit a écrit :

putain mais il est horrible ce package de vmailmgr, rien n'est standard :/  




Remarque, sur ma debian, g++ trouve tout seul 'exit'.
Apparemment stdio et stdlib sont inclus d'office ...

n°154631
joce
Architecte / Développeur principal
&#034;BugHunter&#034;
Posté le 08-06-2002 à 23:05:38  profilanswer
 

Verdoux a écrit a écrit :

 
Remarque, sur ma debian, g++ trouve tout seul 'exit'.
Apparemment stdio et stdlib sont inclus d'office ...  




surement une nouveauté de gcc 3.0.x ou 3.1, au choix :p

n°154632
verdoux
And I'm still waiting
Posté le 08-06-2002 à 23:06:15  profilanswer
 

joce a écrit a écrit :

 
surement une nouveauté de gcc 3.0.x ou 3.1, au choix :p  




Non, j'ai la version 2.95.2 :D

n°154636
joce
Architecte / Développeur principal
&#034;BugHunter&#034;
Posté le 08-06-2002 à 23:10:53  profilanswer
 

Verdoux a écrit a écrit :

 
Non, j'ai la version 2.95.2 :D  




non la nouveauté de gcc 3.x c'est surement de pas inclure d'office je veux dire (vu que c'est plus proche de la norme)


Message édité par joce le 06-08-2002 à 23:10:58
n°154645
Willyzekid
Posté le 08-06-2002 à 23:33:42  profilanswer
 

joce a écrit a écrit :

 
non la nouveauté de gcc 3.x c'est surement de pas inclure d'office je veux dire (vu que c'est plus proche de la norme)  




 
Oui et c'est pour ca que j'ai demandé la version!!!
 
Je suis un incompris :( :sweat:


---------------
Horizon pas Net, reste à la buvette!!
mood
Publicité
Posté le   profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C++

  [C++] Problème de compilation d'une appli en C++

 

Sujets relatifs
probleme lors de la creation de mon site ( avec namo webeditor)[VC++.NET] probleme de linkage
[php] probleme avec MkDirProblème requete SQL
probleme de boutons reactifs sous golive 5[utilisation de gcc] étape intermédiare de compilation
probleme avec mon forum phpbb[Java] problème avec le switch
c++ windows: récupérer le nom de l'éxécutable de l'appli[JS] Probleme de select à choix multiples
Plus de sujets relatifs à : [C++] Problème de compilation d'une appli en C++


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR