[問題] gsl 使用問題...
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
gnu scintific library
問題(Question):
編譯不會過...
/tmp/cc1nkObb.o: In function `main':
test_gsl_bessel.cpp:(.text+0x8e): undefined reference to `gsl_sf_bessel_I1'
collect2: ld returned 1 exit status
麻煩有經驗的高手指導一下 謝謝
程式碼(Code):(請善用置底文網頁, 記得排版)
#include<iostream>
#include<vector>
#include<gsl/gsl_sf_bessel.h>
using namespace std;
int main(){
vector<double> x;
for(int i=1;i<=16;i++)
{
x.push_back(i/2.0);
}
for(vector<double>::const_iterator i=x.begin();i!=x.end();i++)
cout<<scientific<<gsl_sf_bessel_I1(*i)<<"\n";
return 0;
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.118.65.211
→
07/23 19:36, , 1F
07/23 19:36, 1F
→
07/23 19:50, , 2F
07/23 19:50, 2F
※ 編輯: shomingchang 來自: 122.118.65.211 (07/23 21:47)
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章