[GRASS5] MinGW compiler for GDAL

Radim Blazek radim.blazek at gmail.com
Thu Jan 12 08:01:48 EST 2006

Cross-compilation with MinGW fails if GRASS is configured with GDAL.
Linking fails with gcc but works with g++ but object files cannot
be compiled with g++. For example to compile hello.exe which depends
on GDAL, I have to use:
gcc -c -o main.o main.c
g++ -o hello.exe main.o -lgdal -lgeos -lz

My intention is to set for MinGW in configure (configure.in):
SHLIB_LD="${CXX} -shared" instead of CC
and to add EXEC_LD = ${CXX} (configure, Platform.make).
EXEC_LD will be used in Module.make of CC.

Anybody has better ideas?

More information about the grass-dev mailing list