help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] Re: Help - gslwrap


From: Rodney Sparapani
Subject: [Help-gsl] Re: Help - gslwrap
Date: Tue, 05 Sep 2006 10:06:40 -0500
User-agent: Thunderbird 1.5.0.5 (X11/20060730)

M. F. Randrianandrasana wrote:
Hi,
I've tried to compile this simple program main.cpp:

      1#include<gslwrap/matrix_double.h>
      2
      3
      4 main()
      5 {
      6    gsl::matrix a(3,3);
      7    gsl::matrix b(3,3);
      8 }

using this compilation line: g++ -I/usr/local/include -L/usr/local/lib -lgslwrap -o prog main.cpp

and it gives me some errors:
/tmp/ccBXJabq.o: In function `main':
/tmp/ccBXJabq.o(.text+0x15): undefined reference to `gsl::matrix::matrix(unsigned int, unsigned int, bool)' /tmp/ccBXJabq.o(.text+0x2d): undefined reference to `gsl::matrix::matrix(unsigned int, unsigned int, bool)' /tmp/ccBXJabq.o(.text+0x40): undefined reference to `gsl::matrix::~matrix(void)' /tmp/ccBXJabq.o(.text+0x51): undefined reference to `gsl::matrix::~matrix(void)' /tmp/ccBXJabq.o(.text+0x6a): undefined reference to `gsl::matrix::~matrix(void)'
collect2: ld returned 1 exit status.

I've ve checked the header files, which are in the /usr/local/include directory, but there is nothing wrong with them. The library libgslwrap.a is in the /usr/local/lib directory. I'm using the version 1.8 of gsl, the latest version of gslwrap, the version 2.96 of g++ and the version 2.11.93.0.2 20020207 of ld.

Thanks in advance!

You've got the option passed to the linker, "-lgslwrap", in the wrong place. Put it at the end of the line.





reply via email to

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