Hi Alex, You have the -l options in the wrong g++ command. Try this makefile: [code] env_grad.out : main_program.o g++ -o env_grad.out main_program.o -lgsl -lgslcblas -lm main_program.o : main_program.c++ classes.h procedures.h g++ -c main_program.c++ clean : rm -f *.o [\code]
Warren On Fri, Jan 16, 2009 at 7:51 AM, Alexander Kubisch < [email protected]> wrote: > Hello, > > I just tried to compile my C++-program in eclipse with the following > makefile: > > [code] > env_grad.out : main_program.o > g++ -o env_grad.out main_program.o > main_program.o : main_program.c++ classes.h procedures.h > g++ -c -lgsl -lgslcblas -lm main_program.c++ > clean : > rm -f *.o > [\code] > > The compilation aborts and for every line of program code, in which I use > gsl-functions, the "undefined reference to" - error occurs. In the Includes > the gsl-folder is listed and I also tried other compiler-commands, like > -L/usr/include/gsl and others. Always the same problem appeared. Do you have > any idea, what could be the reason for that? BTW, I'm not a programmer, I'm > a biologist, so I'm sorry, if this might be a nooby question ;-) > > Many thanks, > Alex > > > _______________________________________________ > Help-gsl mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-gsl > _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
