OS X下gcc编译报错,Xcode带的gcc

错误是 dpc2sim.a file was built for archive which is not the architecture being linked (x86_64)

用Data Prefetch Championship给的framework写prefetch的程序
http://comparch-conf.gatech.edu/dpc2/
想先跑跑人家给的example,可是编译的时候就报错了。我用的是OS X,gcc版本是Xcode的4.2.1.

Compile your prefetcher .c file against lib/dpc2sim.a, like this:

gcc -Wall -o dpc2sim example_prefetchers/stream_prefetcher.c lib/dpc2sim.a

gcc -Wall -m64 -o dpc2sim example_prefetchers/stream_prefetcher.c lib/dpc2sim.a
重新编译生成

编译的架构不符,参考:http://blog.csdn.net/tangaowen/article/details/8145487