This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Core dumped with test prog.


[Brian Gough <bjg@network-theory.co.uk> écrivait/wrote :]
 

>  > 	I receive a core dumped when trying to execute a small binary
>  > 	(GCC 2.95.3, Solaris Sparc 2.7) compiled with gcc -g main.c  -o
>  > 	sample -lgsl -lgslcblas
>  > main.c is the example program of the documentation (bessel_sf_J0).
>  > 	Program received signal SIGSEGV, Segmentation fault.
>  > 	0xff31a958 in __do_global_ctors_aux () from
>  > 	/usr/local/lib/libgsl.so.0
>  > Any help? 
> 
> Try explicitly linking with the static version library 
>  gcc -g main.c  -o sample /usr/local/lib/libgsl.a \
>  /usr/local/lib/libgslcblas.a
> to see if the problem is related to shared libraries on Solaris.

That's it!

I just had to add "-lm" to your line, the binary is now OK.. 

Keep on the good work on the library... I stay at disposition if I can help more on this problem.

Regards,
Frederic


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]