problem z kompilacja pod Linuxem

0

Witam... oto moj problem:
"[roman@magic scn]$ gcc scn.cpp -o snc
In file included from /usr/include/c++/3.3.4/backward/iostream.h:31,
from scn.cpp
/usr/include/c++/3.3.4/backward/backward_warning.h2: warning: #warning This
file includes at least one deprecated or antiquated header. Please consider usin
g one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples
include substituting the <X> header for the <X.h> header for C++ includes, or <s stream="stream"> instead of the deprecated header <strstream.h>. To disable this warning
use -Wno-deprecated.
scn.cpp20: String.h: Nie ma takiego pliku ani katalogu
[roman@magic scn]$ gcc scn.cpp -o snc
In file included from /usr/include/c++/3.3.4/backward/iostream.h:31,
from scn.cpp
/usr/include/c++/3.3.4/backward/backward_warning.h2: warning: #warning This
file includes at least one deprecated or antiquated header. Please consider usin
g one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples
include substituting the <X> header for the <X.h> header for C++ includes, or <s stream="stream"> instead of the deprecated header <strstream.h>. To disable this warning
use -Wno-deprecated.
scn.cpp18: String: Nie ma takiego pliku ani katalogu
[roman@magic scn]$ gcc scn.cpp -o snc
In file included from /usr/include/c++/3.3.4/backward/iostream.h:31,
from scn.cpp
/usr/include/c++/3.3.4/backward/backward_warning.h2: warning: #warning This
file includes at least one deprecated or antiquated header. Please consider usin
g one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples
include substituting the <X> header for the <X.h> header for C++ includes, or <s stream="stream"> instead of the deprecated header <strstream.h>. To disable this warning
use -Wno-deprecated.
/home/users/roman/tmp/ccUPmSNj.o(.text+0x1b): In function main': : undefined reference to std::cout'
/home/users/roman/tmp/ccUPmSNj.o(.text+0x20): In function main': : undefined reference to std::basic_ostream<char, std::char_traits<char> >& std
::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits
<char> >&, char const*)'
/home/users/roman/tmp/ccUPmSNj.o(.text+0x2f): In function main': : undefined reference to std::cout'
/home/users/roman/tmp/ccUPmSNj.o(.text+0x34): In function main': : undefined reference to std::basic_ostream<char, std::char_traits<char> >& std..."

Mozecie mi wytlumaczyc dlaczego on wyskakuje ? Dzieki i przepraszam za to male zasmiecenie.

0

Chcialem dodac ze jezeli jest błąd w kodzie to go pokazuje a jak kod jest bezbledny dopiero wywala to co wyzej.

Błagam o pomoc ! Moze mi jakiejs biblioteki brakuj. PROSZE !

0

hmm a moze tak poczytac co tam pisze ;)

zamiast <iostream.h> wsadz <iostream> - sa to nowsze wersje udostepniajace dodatkowe mozliwosci.

0

oto efekt wpisania <iostream>

[roman@magic scn]$ gcc scn.cpp -o scn
/home/users/roman/tmp/ccBDWzxL.o(.text+0x1b): In function main': : undefined reference to std::cout'
/home/users/roman/tmp/ccBDWzxL.o(.text+0x20): In function main': : undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/home/users/roman/tmp/ccBDWzxL.o(.text+0x2f): In function main': : undefined reference to std::cout'
/home/users/roman/tmp/ccBDWzxL.o(.text+0x34): In function main': : undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/home/users/roman/tmp/ccBDWzxL.o(.text+0x43): In function main': : undefined reference to std::cout'
/home/users/roman/tmp/ccBDWzxL.o(.text+0x48): In function main': : undefined reference to std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/home/users/roman/tmp/ccBDWzxL.o(.text+0x57): In function main': : undefined reference to std::cout'
/home/users/roman/tmp/ccBDWzxL.o(.text+0x5c): In function main': : undefined reference to std::basic_ostream<char, std::char_traits<char>
itd.

A tutaj jaka biblioteka powinna byc ?

0

ODPOWIEDZ NA PROBLEM !

Zły kompilator !
gcc zamast c++

0 użytkowników online, w tym zalogowanych: 0, gości: 0