help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] undefined reference problem


From: Warren Weckesser
Subject: Re: [Help-gsl] undefined reference problem
Date: Sun, 18 Jan 2009 09:25:40 -0600

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 <
address@hidden> 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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]