I have little understanding about the different machine architectures (32bits , 64bits,...). And because of that, I often have hard time when using C++ libraries on different machines, being stuck with the annoying "undefined symbols for architecture...".
I would be really happy if someone can explain to me why I get such confusing answers when I use the following commands on the same machine (a 2 years old mac with mountain Lion OS)
.
the man uname
indicates
-m print the machine hardware name.
-p print the machine processor architecture name.
- At a first look, I would say that -p is more relevant. So I run
uname -p
and I get:
i386 (which means 32bits If I am not wrong).
- However for a library that I compiled on the same machine, running
lipo -info lib_test.a
returns:
input file lib_test.a is not a fat file
Non-fat file: lib_test.a is architecture: x86_64 (which means 64bits If I am not wrong)
- The Latter is however more coherent with the return of
uname -m
which is
x86_64