public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Need some c++ help here please:
@ 2002-08-26 14:42 Spider
  2002-08-26 15:15 ` Richard Reich
  2002-08-27  3:11 ` Thomas T. Veldhouse
  0 siblings, 2 replies; 7+ messages in thread
From: Spider @ 2002-08-26 14:42 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2792 bytes --]


cat hiworld.cpp
#include <iostream.h>
int main(){
        cout << "Hello World" << endl;
        return(0);
}


Old standard, but should work afaik...

gcc -dumpversion
3.2

c++ -dumpversion
3.2



spider@Darkmere> gcc -o hiworld hiworld.cpp
In file included from /usr/include/g++-v32/backward/iostream.h:31,
                 from hiworld.cpp:1:
/usr/include/g++-v32/backward/backward_warning.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/ccKgk3Jj.o: In function `main':
/tmp/ccKgk3Jj.o(.text+0x13): undefined reference to `std::cout'
/tmp/ccKgk3Jj.o(.text+0x20): 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/ccKgk3Jj.o(.text+0x2b): undefined reference to
`std::basic_ostream<char, std::char_traits<char> >& std::endl<char,
std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char>
>&)'
/tmp/ccKgk3Jj.o(.text+0x30): undefined reference to
`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/ccKgk3Jj.o: In function
`__static_initialization_and_destruction_0(int, int)':
/tmp/ccKgk3Jj.o(.text+0x59): undefined reference to
`std::ios_base::Init::Init[in-charge]()'
/tmp/ccKgk3Jj.o: In function `__tcf_0':
/tmp/ccKgk3Jj.o(.text+0x8a): undefined reference to
`std::ios_base::Init::~Init [in-charge]()'
/tmp/ccKgk3Jj.o(.eh_frame+0x11): undefined reference to
`__gxx_personality_v0'
collect2: ld returned 1 exit status

spider@Darkmere> c++ -o hiworld hiworld.cpp                             
                                          /tmp/dd
In file included from /usr/include/g++-v32/backward/iostream.h:31,
                 from hiworld.cpp:1:
/usr/include/g++-v32/backward/backward_warning.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.




But this works.... . 

Now.. what am I missing here???

//Spider


--
begin  .signature
This is a .signature virus! Please copy me into your .signature!
See Microsoft KB Article Q265230 for more information.
end

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-08-27  9:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-26 14:42 [gentoo-dev] Need some c++ help here please: Spider
2002-08-26 15:15 ` Richard Reich
2002-08-26 15:18   ` Spider
2002-08-26 17:12     ` Terje Kvernes
2002-08-27  8:15       ` Thomas M. Beaudry
2002-08-27  9:20         ` Kim Nielsen
2002-08-27  3:11 ` Thomas T. Veldhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox