PDA

View Full Version : [SOLVED] Compilation issue with gsl



amd3
December 6th, 2015, 01:48 PM
Hello,

I have a compilation problem. I need to first solve an implicit non-linear equation and then to find the eigenvalues of a non symmetric matrix. The top of my code includes those libraries :


#include <gsl/gsl_vector.h>
#include <gsl/gsl_multiroots.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_eigen.h


In a first place when I was only using the gsl_vector and the gsl_multiroots I used to compile with the line :


gcc my_program.c `pkg-config --cflags --libs gsl` -o my_program


But when I do that I now get from the terminal :


/tmp/ccmeqXCQ.o: dans la fonction « main »:
stab_bis.c:(.text+0xcb3): référence indéfinie vers « gsl_eigen_non_symmv_free »
collect2: error: ld returned 1 exit status


If any one has an idea it would be great to let me know !

Merci ! Thanks ! Grazie ! Gracias !

steeldriver
December 6th, 2015, 02:44 PM
Hello and welcome to the forums

Are you sure you are using the correct function name in your call? A quick search of the lib suggests it should be gsl_eigen_nonsymmv_free instead of gsl_eigen_non_symmv_free

amd3
December 6th, 2015, 02:51 PM
I think you are right it seems to work ! Sorry I didn't see my mistake...