[질문]fftw 라이브러리 설치후 컴파일시 링크 에러

살자의 이미지

안녕하세요. www.fftw.org에서 fftw-2.5.1 버젼을 다운받아서 설치 했습니다.
/usr/local/lib 밑에 rfftw.a 파일이 생겼구여 /usr/local/include 밑에 fftw.h , rfftw.h 파일이 생겼습니다.
그래서 테스트를 위해 아래 소스를 받아와 컴파일 하는데 짜구 링크 에러가 생깁니다.
고수님들은 어떤 방법으로 해결했는지요... 많은 조언 부탁드립니다.

컴파일 방법
gcc -o fftw_test fftw_test.c -I/usr/local/include -L/usr/local/lib -lrfftw -lm

소스 (fftw_test.c)
#include
#include
#include
#include
#define LENGS 1024
#define DX 0.01

int main(void)
{
fftw_real in_ary[LENGS] ,out_ary[LENGS] , spectlum[LENGS/2 +1];
rfftw_plan pulan;
int n;

rfftw_plan rfftw_create_plan();
void rfftw_one();
void rfftw_destroy_plan();

/* double omega; */
for(n=0 ; n in_ary[n] = 0.0 ;
/* omega = 1.0 + n / LENGS ;
* * in_ary[n] = sin(n * DX * omega); */
}
in_ary[200] = 1.0; /* gauss's delta function */

pulan = rfftw_create_plan(LENGS, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE);
rfftw_one(pulan, in_ary, out_ary);

spectlum[0] = out_ary[LENGS] * out_ary[LENGS];
for(n=1 ; n<(LENGS+1)/2 ; n++){
spectlum[n] = out_ary[n] * out_ary[n] + out_ary[LENGS-n]*out_ary[LENGS-n];
}
spectlum[LENGS/2] = out_ary[LENGS/2] * out_ary[LENGS/2] ;

rfftw_destroy_plan(pulan);

for(n=0 ; n printf("%6.3f %8.5f\n",(double)(n /(LENGS * DX)), spectlum[n]);
}
return 0;
}

컴파일시 나타나는 에러 내용입니다.
cc1: warning: changing search order for system directory "/usr/local/include"
cc1: warning: as it has already been specified as a non-system directory
/usr/local/lib/librfftw.a(rplanner.o): In function `rplanner':
rplanner.o(.text+0x3e): undefined reference to `fftw_lookup'
rplanner.o(.text+0x4c): undefined reference to `fftw_use_plan'
rplanner.o(.text+0xb4): undefined reference to `fftw_insert'
rplanner.o(.text+0xf9): undefined reference to `fftw_wisdom_add'
/usr/local/lib/librfftw.a(rplanner.o): In function `rfftw_create_plan_specific':
rplanner.o(.text+0x1b8): undefined reference to `fftw_make_empty_table'
rplanner.o(.text+0x1fe): undefined reference to `fftw_destroy_table'
rplanner.o(.text+0x211): undefined reference to `fftw_complete_twiddle'
/usr/local/lib/librfftw.a(rplanner.o): In function `rfftw_create_plan':
rplanner.o(.text+0x288): undefined reference to `fftw_make_empty_table'
rplanner.o(.text+0x2ce): undefined reference to `fftw_destroy_table'
rplanner.o(.text+0x2e1): undefined reference to `fftw_complete_twiddle'
rplanner.o(.text+0x2f9): undefined reference to `fftw_malloc'
rplanner.o(.text+0x33e): undefined reference to `fftw_free'
rplanner.o(.text+0x34f): undefined reference to `fftw_make_empty_table'
rplanner.o(.text+0x395): undefined reference to `fftw_destroy_table'
rplanner.o(.text+0x3a8): undefined reference to `fftw_complete_twiddle'
/usr/local/lib/librfftw.a(rplanner.o): In function `rfftw_print_plan':
rplanner.o(.text+0x3e4): undefined reference to `fftw_fprint_plan'
/usr/local/lib/librfftw.a(rplanner.o): In function `rplanner_wisdom':
rplanner.o(.text+0x447): undefined reference to `fftw_wisdom_lookup'
rplanner.o(.text+0x566): undefined reference to `fftw_make_node_hc2hc'
rplanner.o(.text+0x59c): undefined reference to `fftw_make_plan'
rplanner.o(.text+0x5a6): undefined reference to `fftw_use_plan'
rplanner.o(.text+0x5c5): undefined reference to `fftw_complete_twiddle'
rplanner.o(.text+0x5da): undefined reference to `fftw_destroy_plan_internal'
rplanner.o(.text+0x620): undefined reference to `fftw_make_node_hc2real'
rplanner.o(.text+0x656): undefined reference to `fftw_make_plan'
rplanner.o(.text+0x660): undefined reference to `fftw_use_plan'
rplanner.o(.text+0x687): undefined reference to `fftw_complete_twiddle'
rplanner.o(.text+0x6a1): undefined reference to `fftw_make_node_real2hc'
/usr/local/lib/librfftw.a(rplanner.o): In function `rplanner_normal':

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.