[Pardus-kullanicilari] gnu scientific library kullanan var mı?
erkin tek
gemeyilim at gmail.com
18 Şub 2006 Cmt 12:19:12 EET
Selam,
gsl'yi kurdum, fakat hocamın bilgisayrında vermeyen uyarılar verdi.
test.cpp
> #include <stdlib.h>
> #include <stdio.h>
> #include <iostream>
> #include <fstream>
> #include <math.h>
> #include <gsl/gsl_math.h>
> #include <gsl/gsl_matrix.h>
> #include <gsl/gsl_ieee_utils.h>
> #include <gsl/gsl_vector.h>
> #include <gsl/gsl_eigen.h>
> #include <gsl/gsl_rng.h>
> #include <gsl/gsl_randist.h>
>
>
> int main(){
>
> const gsl_rng_type * T;
> gsl_rng * r;
> gsl_rng_env_setup();
> T = gsl_rng_mt19937;
> r = gsl_rng_alloc (T);
> int Num= 50,i; //Numbers of atoms
> float uncertain,
> xalign= 0.6, // X alignments of atoms
> x0=0; //
>
>
> gsl_matrix * inter = gsl_matrix_alloc (Num,Num);//interaction matrix
> gsl_vector * nerdesiniz = gsl_vector_alloc (Num);//position vector for
> Mg-atoms
> for ( i = 0; i < Num; i++) {
> uncertain=gsl_ran_gaussian(r, xalign*.68 );
> printf("%f",uncertain);
> gsl_vector_set (nerdesiniz, i, x0 + i*xalign+ uncertain);
> }
>
> }
>
> derlemeye çalışınca verdiği hatalar:
erkintek at pardus 400 $ g++ test.cpp
/tmp/ccIplOgl.o: In function `main':
test.cpp:(.text+0x11b): undefined reference to `gsl_rng_env_setup'
test.cpp:(.text+0x120): undefined reference to `gsl_rng_mt19937'
test.cpp:(.text+0x12e): undefined reference to `gsl_rng_alloc'
test.cpp:(.text+0x15a): undefined reference to `gsl_matrix_alloc'
test.cpp:(.text+0x168): undefined reference to `gsl_vector_alloc'
test.cpp:(.text+0x194): undefined reference to `gsl_ran_gaussian'
test.cpp:(.text+0x1cc): undefined reference to `gsl_vector_set'
collect2: ld returned 1 exit status
valla canımı sıkarsa kendim yazarım gerçi 250x250 matrix falan gelirse
yandık! Bide işin eigen vektör ve fonksiyonlarını bulmak varki aman aman
diyeyim ben sie
saygılar sevgiler
--
www.fotograf.web.tr
-------------- sonraki bölüm --------------
Bir HTML eklentisi temizlendi...
URL: http://liste.uludag.org.tr/pardus-kullanicilari/attachments/20060218/8e5ee235/attachment.html
Pardus-kullanicilari mesaj listesiyle ilgili
daha fazla bilgi