[GRASS-user] Problem compiling code

Hi,

When I tried compiling a program of mine that I developed with the old version of grass (grass6), it compiled fine. Now, when I just tried compiling the same code, I can't get to do it. I get the following message. I'd be glad for any help that anyone can suggest.

/usr/bin/ld: warning: libgrass_gis.so, needed by /home/bsm2/abhi/lib/grass6.0.0-i686-pc-linux-gnu-14_03_2005/lib//libgrass_gmath.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libgrass_datetime.so, needed by /home/bsm2/abhi/lib/grass6.0.0-i686-pc-linux-gnu-14_03_2005/lib//libgrass_gmath.so,not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libfftw.so.2, needed by /home/bsm2/abhi/lib/grass6.0.0-i686-pc-linux-gnu-14_03_2005/lib//libgrass_gmath.so, not found (try using -rpath or -rpath-link)
/home/bsm2/abhi/lib/grass6.0.0-i686-pc-linux-gnu-14_03_2005/lib//libgrass_gmath.so: undefined reference to `fftw2d_create_plan'
/home/bsm2/abhi/lib/grass6.0.0-i686-pc-linux-gnu-14_03_2005/lib//libgrass_gmath.so: undefined reference to `G_fatal_error'
/home/bsm2/abhi/lib/grass6.0.0-i686-pc-linux-gnu-14_03_2005/lib//libgrass_gmath.so: undefined reference to `G_calloc'
/home/bsm2/abhi/lib/grass6.0.0-i686-pc-linux-gnu-14_03_2005/lib//libgrass_gmath.so: undefined reference to `G_free'
/home/bsm2/abhi/lib/grass6.0.0-i686-pc-linux-gnu-14_03_2005/lib//libgrass_gmath.so: undefined reference to `fftwnd_destroy_plan'
/home/bsm2/abhi/lib/grass6.0.0-i686-pc-linux-gnu-14_03_2005/lib//libgrass_gmath.so: undefined reference to `G_malloc'
/home/bsm2/abhi/lib/grass6.0.0-i686-pc-linux-gnu-14_03_2005/lib//libgrass_gmath.so: undefined reference to `fftwnd_one'
collect2: ld returned 1 exit status

Thanks

Abhi

--
Abhinandan Raghavan,
Biomolecular Structure and Modeling Unit,
Department of Biochemistry and Molecular Biology,
University College London,
Darwin Building, Gower Street,
London WC1E 6BT

Ph: +44-20-76792303
E-mail: abhi@biochem.ucl.ac.uk

Abhinandan Raghavan wrote:

When I tried compiling a program of mine that I developed with the old
version of grass (grass6), it compiled fine. Now, when I just tried
compiling the same code, I can't get to do it. I get the following
message. I'd be glad for any help that anyone can suggest.

/usr/bin/ld: warning: libgrass_gis.so, needed by
/home/bsm2/abhi/lib/grass6.0.0-i686-pc-linux-gnu-14_03_2005/lib//libgrass_gmath.so,
not found (try using -rpath or -rpath-link)

Follow its advice: use -rpath-link, e.g.:

  gcc ... \
  -L/home/bsm2/abhi/lib/grass6.0.0-i686-pc-linux-gnu-14_03_2005/lib \
  -Wl,-rpath-link,/home/bsm2/abhi/lib/grass6.0.0-i686-pc-linux-gnu-14_03_2005/lib \
  -lgrass_gmath.so

--
Glynn Clements <glynn@gclements.plus.com>