I would have expected the linking problem with machine B that is 32bits and not with machine C that is 64bits but I got the opposite. Ld: symbol(s) not found for architecture x86_64Ĭlang: error: linker command failed with exit code 1 (use -v to see invocation)Īdditional Info on Machine C g++ -versionĬonfigured with: -prefix=/Applications/Xcode.app/Contents/Developer/usr -with-gxx-include-dir=/usr/include/c++/4.2.1Īpple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) 'std::basic_ostream >& std::operator(std::basic_ostream >&, char const*)', referenced from: SimpleClass::SimpleClass() in libtest_sc.a(SC.o) Std::cout & std::endl >(std::basic_ostream >&)', referenced from: I build a library on machine A, a 2 years old mac with OS x 10.7.5 (that I guess is 64 bits my guess being based on the commands you will see below in Additional Info) using the following files.Ī header SimpleClass.hpp: #ifndef SIMPLECLASS_HPPĪ source file SimpleClass.cpp: #include 'SimpleClass.h' So I decided to give an example of situations I face and that I can not understand. Machine type (C++ librairies) : i386 vs x86_64īut I guess I did a mistake by being not precise. I sent a post about my confusion earlier this morning If you fall on this post, you may want to jump directly to the answer