So, I just did a fresh install of ubuntu 11.10, and am in the process of reinstalling gsl. For some reason, my old make file seems not to work, and am trying to figure out how to change it. Last time I had a similar problem, people in here were very helpful in figuring it out, so I've got my fingers crossed :)
The call to g++ is:
g++ -Wall -lgsl -lgslcblas -lm -L/usr/lib -I /usr/include/gsl -o main main.o neuron.o network.o synapse.o dataAnalysis.o
neuron.o: In function `neuron::updateSpikeTime()': /home/kaare/LIFnetworks/neuron.cpp:123: undefined reference to `gsl_root_fsolver_set' /home/kaare/LIFnetworks/neuron.cpp:131: undefined reference to `gsl_root_fsolver_iterate' /home/kaare/LIFnetworks/neuron.cpp:132: undefined reference to `gsl_root_fsolver_root' /home/kaare/LIFnetworks/neuron.cpp:133: undefined reference to `gsl_root_fsolver_x_lower' /home/kaare/LIFnetworks/neuron.cpp:134: undefined reference to `gsl_root_fsolver_x_upper' /home/kaare/LIFnetworks/neuron.cpp:135: undefined reference to `gsl_root_test_interval' /home/kaare/LIFnetworks/neuron.cpp:140: undefined reference to `gsl_root_fdfsolver_set' /home/kaare/LIFnetworks/neuron.cpp:147: undefined reference to `gsl_root_fdfsolver_iterate' /home/kaare/LIFnetworks/neuron.cpp:149: undefined reference to `gsl_root_fdfsolver_root' /home/kaare/LIFnetworks/neuron.cpp:150: undefined reference to `gsl_root_test_delta' neuron.o: In function `__static_initialization_and_destruction_0': /home/kaare/LIFnetworks/neuron.cpp:16: undefined reference to `gsl_root_fsolver_brent' /home/kaare/LIFnetworks/neuron.cpp:17: undefined reference to `gsl_root_fsolver_alloc' /home/kaare/LIFnetworks/neuron.cpp:19: undefined reference to `gsl_root_fdfsolver_newton' /home/kaare/LIFnetworks/neuron.cpp:20: undefined reference to `gsl_root_fdfsolver_alloc' collect2: ld returned 1 exit status make: *** [main] Error 1
So, I assume that I am not linking to the binary correctly? According to http://www.gnu.org/s/gsl/manual/html_node/Linking-programs-with-the-library.html, I have to link to the location of libgsl.a. However, looking in the folder:
kaare@kaare-Inspiron-1720:/usr/lib$ ls libgsl* libgsl.a libgslcblas.so libgslcblas.so.0.0.0 libgsl.so.0 libgslcblas.a libgslcblas.so.0 libgsl.so libgsl.so.0.16.0
Any ideas to what I'm doing wrong? I have had some difficulties figuring out which package to install, as there seems to not be just one gsl-package out there. I have no recollection of what I did last time.