title: /usr/bin/ld cannot find -lfftw3?
body: <p>So I am using FFTW 3.3.3. While trying to invoke make from the Makefile, I encounter this problem:</p>
  
  <pre><code>    /usr/bin/ld: cannot find -lfftw3
      collect2: ld returned 1 exit status
      make: *** [fftw_ex] Error 1
  </code></pre>
  
  <p>I previously compiled my code directly with:</p>
  
  <pre><code>    gcc -o fftw_ex fftw_ex.c -I$TACC_FFTW3_INC -L$TACC_FFTW3_LIB -lfftw3
  </code></pre>
  
  <p>and it worked just fine. Here is my Makefile, in case it's needed:</p>
  
  <pre><code>    #                     RULES
      EXEC := fftw_ex
      SRC := $(wildcard *.c)
      OBJ := $(SRC)
      #                     OPERATIONS
      CC := gcc
      CFLAGS := -O3 -I$TACC_FFTW3_INC
      LDFLAGS := -L$TACC_FFTW3_LI
      LDLIBS := -lfftw3
  
      $(EXEC): $(OBJ)
      $(CC) $(LDFLAGS) $(LDLIBS) -g -o $@ $^
  
      %.o: %.c
              $(CC) $(CFLAGS) -c $&lt;
  
      #                   PHONY TARGETS
      .PHONY: clean
  
      clean:
              @echo Cleaning...;rm -rf *.o fftw_ex
  </code></pre>
  
  <p>Any help would be greatly appreciated!</p>