Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22016

Setting C++ compile flags in xcode

$
0
0

I faced with the same issue for this question: Undefine symbols for architecture x86_64 using FFTW
And I tried to use flag -L and -l for C++ in xcode, but it doesn't work enter image description here Here is the error log:

  clang: warning: -lsndfile: 'linker' input unused
  clang: warning: -lfftw3: 'linker' input unused
  clang: warning: argument unused during compilation: '-L/usr/local/lib'

  Undefined symbols for architecture x86_64:
   "_fftw_destroy_plan", referenced from:
     _main in main.o
   "_fftw_execute", referenced from:
     _main in main.o
   "_fftw_plan_dft_r2c_1d", referenced from:
   _main in main.o
   "_sf_close", referenced from:
    _main in main.o
   "_sf_open", referenced from:
    _main in main.o
   "_sf_read_double", referenced from:
    _main in main.o
   ld: symbol(s) not found for architecture x86_64
   clang: error: linker command failed with exit code 1 (use -v to see invocation)


But if I compile with gcc in command line, it works well.

  gcc -I/Users/sr2/Documents/Soft/fftw-3.3.4 -I/usr/local/include  
      -L/usr/local/lib -lfftw3 -lsndfile main.c -o fft_sample

where am I wrong?


Viewing all articles
Browse latest Browse all 22016

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>