I have a very strange and elusive problem. I am compiling a multi-file program. When I use
Code:
gcc -o program.app file1.cpp file2.cpp
It works, but when I use this code:
Code:
gcc -c file1.cpp
gcc -c file2.cpp
ld -o program.app file1.o file2.o
I get this error:
Code:
ld: Undefined symbols:
___gxx_personality_v0
dyld_stub_binding_helper
__ZNSt8ios_base4InitC1Ev
__ZNSt8ios_base4InitD1Ev
__ZSt4cout<br>
__ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PK
It doesn't work. I've looked all over the place, but I can't find any reason that it doesn't work. Any ideas?