1 |
cat hiworld.cpp |
2 |
#include <iostream.h> |
3 |
int main(){ |
4 |
cout << "Hello World" << endl; |
5 |
return(0); |
6 |
} |
7 |
|
8 |
|
9 |
Old standard, but should work afaik... |
10 |
|
11 |
gcc -dumpversion |
12 |
3.2 |
13 |
|
14 |
c++ -dumpversion |
15 |
3.2 |
16 |
|
17 |
|
18 |
|
19 |
spider@Darkmere> gcc -o hiworld hiworld.cpp |
20 |
In file included from /usr/include/g++-v32/backward/iostream.h:31, |
21 |
from hiworld.cpp:1: |
22 |
/usr/include/g++-v32/backward/backward_warning.h:32:2: warning: #warning |
23 |
This file includes at least one deprecated or antiquated header. Please |
24 |
consider using one of the 32 headers found in section 17.4.1.2 of the |
25 |
C++ standard. Examples include substituting the <X> header for the <X.h> |
26 |
header for C++ includes, or <sstream> instead of the deprecated header |
27 |
<strstream.h>. To disable this warning use -Wno-deprecated. |
28 |
/tmp/ccKgk3Jj.o: In function `main': |
29 |
/tmp/ccKgk3Jj.o(.text+0x13): undefined reference to `std::cout' |
30 |
/tmp/ccKgk3Jj.o(.text+0x20): undefined reference to |
31 |
`std::basic_ostream<char, std::char_traits<char> >& std::operator<< |
32 |
<std::char_traits<char> >(std::basic_ostream<char, |
33 |
std::char_traits<char> >&, char const*)' |
34 |
/tmp/ccKgk3Jj.o(.text+0x2b): undefined reference to |
35 |
`std::basic_ostream<char, std::char_traits<char> >& std::endl<char, |
36 |
std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> |
37 |
>&)' |
38 |
/tmp/ccKgk3Jj.o(.text+0x30): undefined reference to |
39 |
`std::basic_ostream<char, std::char_traits<char> |
40 |
>::operator<<(std::basic_ostream<char, std::char_traits<char> >& |
41 |
>(*)(std::basic_ostream<char, std::char_traits<char> >&))' |
42 |
/tmp/ccKgk3Jj.o: In function |
43 |
`__static_initialization_and_destruction_0(int, int)': |
44 |
/tmp/ccKgk3Jj.o(.text+0x59): undefined reference to |
45 |
`std::ios_base::Init::Init[in-charge]()' |
46 |
/tmp/ccKgk3Jj.o: In function `__tcf_0': |
47 |
/tmp/ccKgk3Jj.o(.text+0x8a): undefined reference to |
48 |
`std::ios_base::Init::~Init [in-charge]()' |
49 |
/tmp/ccKgk3Jj.o(.eh_frame+0x11): undefined reference to |
50 |
`__gxx_personality_v0' |
51 |
collect2: ld returned 1 exit status |
52 |
|
53 |
spider@Darkmere> c++ -o hiworld hiworld.cpp |
54 |
/tmp/dd |
55 |
In file included from /usr/include/g++-v32/backward/iostream.h:31, |
56 |
from hiworld.cpp:1: |
57 |
/usr/include/g++-v32/backward/backward_warning.h:32:2: warning: #warning |
58 |
This file includes at least one deprecated or antiquated header. Please |
59 |
consider using one of the 32 headers found in section 17.4.1.2 of the |
60 |
C++ standard. Examples include substituting the <X> header for the <X.h> |
61 |
header for C++ includes, or <sstream> instead of the deprecated header |
62 |
<strstream.h>. To disable this warning use -Wno-deprecated. |
63 |
|
64 |
|
65 |
|
66 |
|
67 |
But this works.... . |
68 |
|
69 |
Now.. what am I missing here??? |
70 |
|
71 |
//Spider |
72 |
|
73 |
|
74 |
-- |
75 |
begin .signature |
76 |
This is a .signature virus! Please copy me into your .signature! |
77 |
See Microsoft KB Article Q265230 for more information. |
78 |
end |