Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bash-4.3$ cat nwp.cpp
- #include <iostream>
- int main(){for(int b:"\0\0?")std::cout<<"Happy Birthday "<<(b?"Dear C++":"To You")<<'\n';}
- bash-4.3$ gcc -std=c++11 nwp.cpp
- /tmp/cc0hBACg.o: In function `main':
- nwp.cpp:(.text+0x4c): undefined reference to `std::cout'
- 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*)'
- 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*)'
- 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)'
- /tmp/cc0hBACg.o: In function `__static_initialization_and_destruction_0(int, int)':
- nwp.cpp:(.text+0xab): undefined reference to `std::ios_base::Init::Init()'
- nwp.cpp:(.text+0xba): undefined reference to `std::ios_base::Init::~Init()'
- collect2: error: ld returned 1 exit status
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement