I have a Mac Pro with 2 2-core intel processors. I am running OSX Leopard. I have FFTw 3.1.2 installed and functional. When I am writing a C program, and compiling without the -arch x86_64 flag all of my C programs (which use FFTw) compile just fine. I want to write and run some programs that require a 64 bit address for memory (getting to 4 GB of memory). When I add the -arch x86_64 flag to my makefile I get the following errors when I try to compile my program:
bash-3.2$ make
gcc -Wall -O -arch x86_64 -lm -o tm_upml_afp_c4 tm_upml_afp_c4.c -lfftw3 -lm -lpthread
ld: warning in wrtraw-pkg.o, file is not of required architecture
ld: warning in /usr/local/lib/libfftw3.a, file is not of required architecture
Undefined symbols:
"_fftw_execute", referenced from:
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
"_fftw_destroy_plan", referenced from:
_main in ccDDrxGA.o
_main in ccDDrxGA.o
"_fftw_plan_dft_c2r_1d", referenced from:
_main in ccDDrxGA.o
"_fftw_cleanup", referenced from:
_main in ccDDrxGA.o
"_fftw_plan_dft_r2c_1d", referenced from:
_main in ccDDrxGA.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [tm_upml_afp_c4] Error 1
Is there a flag or something I need to set to make FFTw work with a 64-bit compiler? I can't find anything I need to fix this.
bash-3.2$ make
gcc -Wall -O -arch x86_64 -lm -o tm_upml_afp_c4 tm_upml_afp_c4.c -lfftw3 -lm -lpthread
ld: warning in wrtraw-pkg.o, file is not of required architecture
ld: warning in /usr/local/lib/libfftw3.a, file is not of required architecture
Undefined symbols:
"_fftw_execute", referenced from:
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
_main in ccDDrxGA.o
"_fftw_destroy_plan", referenced from:
_main in ccDDrxGA.o
_main in ccDDrxGA.o
"_fftw_plan_dft_c2r_1d", referenced from:
_main in ccDDrxGA.o
"_fftw_cleanup", referenced from:
_main in ccDDrxGA.o
"_fftw_plan_dft_r2c_1d", referenced from:
_main in ccDDrxGA.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [tm_upml_afp_c4] Error 1
Is there a flag or something I need to set to make FFTw work with a 64-bit compiler? I can't find anything I need to fix this.