How to compile C++ is_pod?
Peng Yu
pengyu.ut at gmail.com
Sun Dec 1 11:47:17 PST 2013
Hi,
http://www.cplusplus.com/reference/type_traits/is_pod/
I'm trying to compile the above code. But I get the following error.
Do I use the correct option for gcc-mp-4.7. Or there is some error
with my gcc-mp-4.7 installation? Thanks.
~/linux/test/cpp/cpp/library/type_traits/is_pod$ gcc-mp-4.7 -std=c++11
-o main main.cpp
Undefined symbols for architecture x86_64:
"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> >&))", referenced
from:
_main in ccSTl4KA.o
"std::basic_ostream<char, std::char_traits<char>
>::operator<<(std::ios_base& (*)(std::ios_base&))", referenced from:
_main in ccSTl4KA.o
"std::basic_ostream<char, std::char_traits<char>
>::operator<<(bool)", referenced from:
_main in ccSTl4KA.o
"std::ios_base::Init::Init()", referenced from:
__static_initialization_and_destruction_0(int, int) in ccSTl4KA.o
"std::ios_base::Init::~Init()", referenced from:
__static_initialization_and_destruction_0(int, int) in ccSTl4KA.o
"std::cout", referenced from:
_main in ccSTl4KA.o
"std::basic_ostream<char, std::char_traits<char> >& std::endl<char,
std::char_traits<char> >(std::basic_ostream<char,
std::char_traits<char> >&)", referenced from:
_main in ccSTl4KA.o
"std::basic_ostream<char, std::char_traits<char> >& std::operator<<
<std::char_traits<char> >(std::basic_ostream<char,
std::char_traits<char> >&, char const*)", referenced from:
_main in ccSTl4KA.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
--
Regards,
Peng
More information about the macports-users
mailing list