【问题标题】:Undefine symbols for architecture x86_64 using FFTW使用 FFTW 取消定义架构 x86_64 的符号
【发布时间】:2013-11-30 11:59:27
【问题描述】:
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$ 


这告诉我什么?

【问题讨论】:

    标签: c fftw


    【解决方案1】:

    它告诉你忘记使用-L 和-l 告诉gcc FFTW 库在哪里以及它们的名称。

    【讨论】:

    • 对不起,我真的很陌生。我将如何具体说明这一点?我的图书馆在 /usr/local/lib
    • -L 获取库位置,-l 获取库文件名减去“lib”和扩展名。 -L/usr/local/lib -lfftwwhatever
    • 嗯,我不断收到“ld: library not found for -libfftw3.la clang: error: linker command failed with exit code 1 (use -v to see invocation)”奇怪,我盯着现在在那里的文件中。
    • 请再次阅读我的评论。我相信你错过了一些事情。
    • 很抱歉给您带来了麻烦。我输入了“gcc -o prog -I/usr/local/include test.c -L/usr/local/lib -lfftw3f.la”,它给了我这个错误。
    猜你喜欢
    • 1970-01-01
    • 2014-08-07
    • 2012-07-20
    • 1970-01-01
    • 2015-08-23
    • 2014-05-27
    • 2017-07-06
    • 2016-06-20
    • 2016-06-14
    相关资源
    最近更新 更多