[MINC-users] dyld errors

Rick Hoge r.hoge at umontreal.ca
Fri Mar 6 09:39:37 EST 2009


Maybe this is more for the developer's list, but to follow up...

> The only thing that's missing is an answer to the question "how can I
> tell if my processor is 64-bit".  I can't find any command-line
> utility (uname, arch, machine, etc.) that will generate an x86_64
> output on my MacBook Pro (on which I'm developing and running all
> kinds of 64-bit stuff).

You *can* get the manufacturer's processor name on the command-line on  
a Mac using

Rick-MBP:~ -> system_profiler | grep 'Processor Name'
       Processor Name: Intel Core 2 Duo

But this does not explicitly indicate the pointer width.

More painfully, you could build a tiny program that prints the value  
of sizeof(void*):

echo "#include <stdio.h>" > test.c
echo "int main(int argc, char *argv[]) { fprintf(stdout,\"%d\n 
\",sizeof(void*)); return 0; }" >> test.c
gcc -o test-64 -arch x86_64 test.c
gcc -o test-32 -arch i386 test.c
lipo -create test-64 test-32 -output test-fat

running the 'test-fat' executable will print 4 on a 32-bit system, and  
8 on a 64-bit system (prints 8 on my Core 2 Duo MacBook Pro).

The new version of NeuroLens (to be released 'soon') indicates the  
architecture in the About panel using something like this.

Rick








More information about the MINC-users mailing list