Почему gcc 3.3.3 не компилит эти строки:
#include <iostream.h>
main()
{
cout<<"Hello, LOR!";
return 1;
}
файлик называется test.cpp :)
при попытке gcc test.cpp вылазит:
root@localhost~#gcc /home/temp/test.cpp
In file included from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/g++-v3/backward/iostream.h:31,
from /home/temp/test.cpp:1:
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/include/g++-v3/backward/backward_warnin
g.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using 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 <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
/tmp/ccyPMcXv.o(.text+0x1b): In function `main':
: undefined reference to `std::cout'
/tmp/ccyPMcXv.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*)'
/tmp/ccyPMcXv.o(.text+0x49): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `std::ios_base::Init::Init[in-charge]()'
/tmp/ccyPMcXv.o(.text+0x7a): In function `__tcf_0':
: undefined reference to `std::ios_base::Init::~Init [in-charge]()'
/tmp/ccyPMcXv.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
не ругать).
спасибо.
Ответ на:
комментарий
от UVV
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
Похожие темы
- Форум Заголовочный файл (2006)
- Форум Глюк с gcc (2005)
- Форум Point (2011)
- Форум [C++]ошибка компиляции (2010)
- Форум Не работает линкер. (2007)
- Форум Проблемы с gcc в Mandrake 10.1 (2005)
- Форум С++ (2006)
- Форум все равно не могу скомпиллировать (2011)
- Форум проблема с с++ (2004)
- Форум Хочу c++11 в gcc - не работает (2013)