Herzlich Willkommen, lieber Gast!
  Sie befinden sich hier:

  Forum » C / C++ (GNU/Linux, *NIX, *BSD und Co) » Probleme beim Linken und basic_ostream

Forum | Hilfe | Team | Links | Impressum | > Suche < | Mitglieder | Registrieren | Einloggen
  Quicklinks: MSDN-Online || STL || clib Reference Grundlagen || Literatur || E-Books || Zubehör || > F.A.Q. < || Downloads   

Autor Thread - Seiten: > 1 <
000
08.03.2006, 19:51 Uhr
~Lukas_hat_robleme
Gast


Hallo zusammen,

ich habe folgendes Problem beim Linken meiner *.o Dateien mit dem g++ - Compiler:


C++:
make object
g++  -O3 -Wall -pipe   frequency.o Version.o ratio.o mapping.o
(.text+0x123f): In function `Cmathmarker::integrate(std::vector<matrix_member, std::allocator<matrix_member> >, CClassMath&, double)':
/usr/include/c++/3.2.3/bits/stl_vector.h:123: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& operator<< <unsigned int>(std::basic_ostream<char, std::char_traits<char> >&, std::vector<unsigned int, std::allocator<unsigned int> >)'


collect2: ld returned 1 exit status
make: *** [object] Fehler 1

Compilation exited abnormally with code 2 at Wed Mar  8 19:41:40



Irgendwie scheint der Compiler also die Library, in der "basic_ostream" drin steht, nicht zu finden. Was tun?

Besten Dank!

Gruß,
Lukas
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
001
09.03.2006, 09:01 Uhr
virtual
Sexiest Bit alive
(Operator)


Also ich glaube, du rufst da etwas auf, was es so erstmale nicht gibt

C++:
std::basic_ostream<char, std::char_traits<char> >& operator<< <unsigned int>(std::basic_ostream<char, std::char_traits<char> >&, std::vector<unsigned int, std::allocator<unsigned int> >)


Ist kurz geschrieben:

C++:
std::ostream& operator<< (std::ostream&, std::vector<unsigned>);


Also der Ausgabeoperator für einen std::vector<unsigned>. Mir wäre neu, wenn ein solcher automatisch da ist. Den musst Du wohl selbst schreiben.
--
Gruß, virtual
Quote of the Month
Ich eß' nur was ein Gesicht hat (Creme 21)
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
002
09.03.2006, 11:45 Uhr
~Lukas_hat_Probleme
Gast


Vielen Dank!

Das hat mir SEHR geholfen. Ich habe die Passagen, bei der dieser Operator aufgerufen wird,
angepasst und nun klappt's!

Viele Grüße,
Lukas
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
Seiten: > 1 <     [ C / C++ (GNU/Linux, *NIX, *BSD und Co) ]  


ThWBoard 2.73 FloSoft-Edition
© by Paul Baecher & Felix Gonschorek (www.thwboard.de)

Anpassungen des Forums
© by Flo-Soft (www.flo-soft.de)

Sie sind Besucher: