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

  FORUM HardWare.fr
  Linux et OS Alternatifs

  probleme avec gcc

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

probleme avec gcc

n°762199
carot0
Posté le 14-12-2005 à 21:12:26  profilanswer
 

slt tlm
 
je rencontre un probleme avec gcc. un exemple est meiux qu'un long discour

Code :
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. cout<<"hello world"<<endl;
  6. return 0;
  7. }


 
on fait pas plus simple, ce code ce compilait et marchait encore hier. aujourd'hui voici l'erreur de gcc

gcc hello.cpp -o hello
/tmp/ccRVkiTP.o: In function `main':hello.cpp:(.text+0x25): référence indéfinie vers « std::cout »
:hello.cpp:(.text+0x2a): référence indéfinie vers « std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)»
:hello.cpp:(.text+0x35): référence indéfinie vers « std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >& )»
:hello.cpp:(.text+0x3b): référence indéfinie vers « std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >& ))»
/tmp/ccRVkiTP.o: In function `__tcf_0':hello.cpp:(.text+0x59): référence indéfinie vers « std::ios_base::Init::~Init()»
/tmp/ccRVkiTP.o: In function `__static_initialization_and_destruction_0(int, int)':hello.cpp:(.text+0x86): référence indéfinie vers « std::ios_base::Init::Init()»
/tmp/ccRVkiTP.o:(.eh_frame+0x11): référence indéfinie vers « __gxx_personality_v0 »
collect2: ld returned 1 exit status


 
 
J'ai l'impression qu'il rencontre un probleme avec iostream
mais je sais pas comment corriger ca.
je ne poste pas dans programmation car je pense pas que ce soit le code qui pose probleme...


---------------
In a world without walls and fences, who needs Windows and Gates
mood
Publicité
Posté le 14-12-2005 à 21:12:26  profilanswer
 

n°762205
ellimac
Posté le 14-12-2005 à 21:26:25  profilanswer
 

vu que tu fait du c++ tu pourrait peut-être essayer de compiler avec g++ ?

n°762220
carot0
Posté le 14-12-2005 à 22:18:21  profilanswer
 

ellimac a écrit :

vu que tu fait du c++ tu pourrait peut-être essayer de compiler avec g++ ?


certe, mais j'aimerai quand meme resoudre ce probleme qui vient juste d'apparaitre
 
il est vrais qu'avec g++ pas le moindre probleme.


Message édité par carot0 le 14-12-2005 à 22:21:19

---------------
In a world without walls and fences, who needs Windows and Gates
n°762306
Taz
bisounours-codeur
Posté le 15-12-2005 à 11:43:34  profilanswer
 

g++, c'est gcc + une configuration par défaut qui link avec libstdc++

n°762307
carot0
Posté le 15-12-2005 à 11:49:50  profilanswer
 

Taz a écrit :

g++, c'est gcc + une configuration par défaut qui link avec libstdc++


ok
mais je comprends pas pourquoi ca se met a merder d'un coup comme ca ( j'ai du faire une maj avec apt )


---------------
In a world without walls and fences, who needs Windows and Gates

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Linux et OS Alternatifs

  probleme avec gcc

 

Sujets relatifs
Samba : Probleme de droit bete et mechant....Problème pour paramètrer accès distant - carte reseau WIFI- sur window
probleme avec mkisofs : no bootprobleme avec lilo...
[ KSH ] Problème de variable...problème d'affichage des pages man sous mandriva ...
Problème "veille"[2.6.14.3] Problème inteface réseau 8139 [résolu]
Problème : Réseau Windows XP à Linux ( distrib : Ubuntu )Lire des acc avec Amarok sous Mandriva 2006 et problème de tag id3
Plus de sujets relatifs à : probleme avec gcc


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