Prob de compilation gcc

Résolu
cs_Tidam Messages postés 124 Date d'inscription jeudi 2 janvier 2003 Statut Membre Dernière intervention 16 février 2006 - 19 févr. 2005 à 12:01
steve_clamage Messages postés 475 Date d'inscription dimanche 3 octobre 2004 Statut Membre Dernière intervention 11 août 2006 - 19 févr. 2005 à 13:43
Salut a tous

voila j'ai un ptit probleme de compilation avec gcc voyez par vous meme



-bash-2.05b$ gcc -o belga main.cpp

/tmp/ccRnrbqU.o(.text+0x646): In function `__static_initialization_and_destruction_0(int, int)':

: undefined reference to `std::ios_base::Init::Init[in-charge]()'

/tmp/ccRnrbqU.o(.text+0x679): In function `__static_initialization_and_destruction_0(int, int)':

: undefined reference to `operator new[](unsigned)'

/tmp/ccRnrbqU.o(.text+0x69a): In function `__static_initialization_and_destruction_0(int, int)':

: undefined reference to `operator new[](unsigned)'

/tmp/ccRnrbqU.o(.text+0x6b7): In function `__tcf_0':

: undefined reference to `std::ios_base::Init::~Init [in-charge]()'

/tmp/ccRnrbqU.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'

collect2: ld returned 1 exit status



si quelqu'un saurait m'aider ca serait avec plaisir :p

3 réponses

steve_clamage Messages postés 475 Date d'inscription dimanche 3 octobre 2004 Statut Membre Dernière intervention 11 août 2006 5
19 févr. 2005 à 13:43
g++ -o belga main.cpp -W -Wall -std=c++98

au lien de

gcc -o belga main.cpp
3
steve_clamage Messages postés 475 Date d'inscription dimanche 3 octobre 2004 Statut Membre Dernière intervention 11 août 2006 5
19 févr. 2005 à 13:12
bien entendu un programme c++ doit etre compilé avec c++ (ou g++)
0
cs_Tidam Messages postés 124 Date d'inscription jeudi 2 janvier 2003 Statut Membre Dernière intervention 16 février 2006 2
19 févr. 2005 à 13:31
uH !

C'est a dire ??
0
Rejoignez-nous