Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. bash-4.3$ cat nwp.cpp
  2. #include <iostream>
  3. int main(){for(int b:"\0\0?")std::cout<<"Happy Birthday "<<(b?"Dear C++":"To You")<<'\n';}
  4.  
  5. bash-4.3$ gcc -std=c++11 nwp.cpp
  6. /tmp/cc0hBACg.o: In function `main':
  7. nwp.cpp:(.text+0x4c): undefined reference to `std::cout'
  8. nwp.cpp:(.text+0x51): 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*)'
  9. nwp.cpp:(.text+0x5c): 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*)'
  10. nwp.cpp:(.text+0x69): 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)'
  11. /tmp/cc0hBACg.o: In function `__static_initialization_and_destruction_0(int, int)':
  12. nwp.cpp:(.text+0xab): undefined reference to `std::ios_base::Init::Init()'
  13. nwp.cpp:(.text+0xba): undefined reference to `std::ios_base::Init::~Init()'
  14. collect2: error: ld returned 1 exit status
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement