[GRASS5] Silly Gdal Lib Error

On Friday, June 1, 2001, at 02:39 PM, Frank Warmerdam wrote:

Jeshua,

OK, I have fixed it up so it builds fine from source now. Could you test
/Users/frankw/gdal/libgdal.1.1.dylib with GRASS's r.in.gdal and see if it
works? You can set your DYLD_LIBRARY_PATH to point to the directory and
it will hopefully work. If not, let me know (and where your GRASS build is).

I have put this build on my GRASS page, so if it works we can proceed to
announce it.

Thanks Frank!

I installed your gdal lib, and when attempting to compile r.in.gdal, I get a "Undefined symbols:
_GBGetSymbol" error.

Any ideas?

Here is the full-related message:

gcc -o /usr/src/grass/dist.powerpc-apple-
darwin1.3.3/etc/bin/cmd/r.in.gdal OBJ.powerpc-apple-darwin1.3.3/main.o OBJ.powerpc-apple-darwin1.3.3/gbgetsymbol.o OBJ.powerpc-apple-
darwin1.3.3/gdalbridge.o OBJ.powerpc-apple-darwin1.3.3/make_loc.o /usr/src/grass/src/libes/LIB.powerpc-apple-darwin1.3.3/libgis.a /usr/src/grass/src/libes/LIB.powerpc-apple-darwin1.3.3/libI.a -ldl -I/usr/include -L/usr/lib -lz
/usr/bin/ld: Undefined symbols:
_GBGetSymbol

Thanks,

Jeshua Lacock
Cartographer/Owner
http://SierraMaps.com
http://3dTopoMaps.com
Telephone: (760) 935-4481

Jeshua Lacock wrote:

I installed your gdal lib, and when attempting to compile r.in.gdal, I
get a "Undefined symbols:
_GBGetSymbol" error.

Any ideas?

src/raster/r.in.gdal/gbgetsymbol.c contains two definitions of
GBGetSymbol(); one definition is conditional upon

  #if defined(__unix__)

while the other is conditional upon

  #ifdef _WIN32

It appears that neither of these macros are defined on your system
(clearly it's the first one which should be). The simplest workaround
is to add "-D__unix__" to CFLAGS (e.g. by adding it to COMPILE_FLAGS
in src/CMD/head/head.<platform>).

--
Glynn Clements <glynn.clements@virgin.net>