The following code compiled on OS X with clang 2.8 from macports gives the missing character errors below.
int main()
{
std::cout << "hello world" << std::endl;
}
jonathancoe@MacBookCoe:/tmp$ clang HW.cpp
Undefined symbols:
"__ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc", referenced from:
_main in cc-C9ObsA.o
"__ZNSt8ios_base4InitC1Ev", referenced from:
___cxx_global_var_init in cc-C9ObsA.o
"__ZNSt8ios_base4InitD1Ev", referenced from:
___cxx_global_var_init in cc-C9ObsA.o
"__ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_", referenced from:
_main in cc-C9ObsA.o
"__ZNSolsEPFRSoS_E", referenced from:
_main in cc-C9ObsA.o
"__ZSt4cout", referenced from:
_main in cc-C9ObsA.o
ld: symbol(s) not found
A simple program communicates perfectly with g ++ without any additional arguments. Any ideas what I can do to get this program to bind or explain why this is not possible (if so)?
source
share