Ceelos
Ceelos

Reputation: 1126

Undefine symbols for architecture x86_64 using FFTW

Ceeloss-MacBook-Pro:desktop ceelos$ gcc -o prog -I/usr/local/include test.c
Undefined symbols for architecture x86_64:
  "_fftw_destroy_plan", referenced from:
      _main in test-IBqBdS.o
  "_fftw_execute", referenced from:
      _main in test-IBqBdS.o
  "_fftw_plan_dft_1d", referenced from:
      _main in test-IBqBdS.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Ceeloss-MacBook-Pro:desktop ceelos$ 


What's this telling me?

Upvotes: 2

Views: 2734

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799110

It's telling you that you forgot to use -L and -l to tell gcc where the FFTW libraries are and what they're called.

Upvotes: 4

Related Questions