Glynn Clements wrote:
Frank Warmerdam wrote:

It includes a somewhat half-baked WinGRASS build I prepared myself
several months ago, based on the wingrass build notes at the time.
Amoung other things, it proves that a MingW built GRASS can use
a VC7.1 built GDAL.

Alas, I'm finding that isn't the case. Any and all attempts to
configure GRASS using the OSGeo4W libraries fail with:

        undefined reference to `GDALOpen'

[This is after I've constructed a working gdal-config from
gdal-config.tmpl.]

I have tried both linking against the import library with:

        -L/c/OSGeo4W/lib -lgdal_i

Glynn,

The gdal-config distributed in /c/osgeo4w/bin should return this for
gdal-config --libs:

[EMAIL PROTECTED] gdal-config --libs
/C/osgeo4w/lib/gdal_i.lib

I use this configure line:

./configure \
        --prefix=c:/warmerda/grassbld/bld \
        --bindir=c:/warmerda/grassbld/bld/bin \
        --with-includes=/c/warmerda/grassbld/forgrass/include \
        --with-libs=/c/warmerda/grassbld/forgrass/lib \
        --with-gdal=/c/osgeo4w/bin/gdal-config \
        --with-proj-includes=/c/osgeo4w/include \
        --with-proj-libs=/c/osgeo4w/lib \
        --with-proj-share=/c/osgeo4w/share/proj \
        --with-cxx --without-jpeg --without-tiff \
        --without-postgres --with-opengl=windows --without-fftw --without-x \
        --enable-x11=no --enable-shared=yes \
        --with-tcltk-includes=/c/tcl/include \
        --with-tcltk-libs=/c/tcl/bin

To get proj to work, I found I had to copy /c/osgeo4w/lib/proj_i.lib to
/c/osgeo4w/lib/libproj.a.  If you file an OSGeo4W ticket on this, I would
be willing to make it a standard part of the proj package for OSGeo4W.  But
in the meantime it is pretty easy to take the .lib stub libraries and copy
them somewhere as .a files for use.

As you may note above, I think PROJ and GDAL were the only two subcomponents
I got from OSGeo4W during the build.  I would hope in the future to get more
but at this point I sort of ran out of steam.

and directly against the DLL with:

        -L/c/OSGeo4W/bin -lgdal15

I also had to remove the msvcrt.dll from the bin directory, as that
caused -L/c/OSGeo4W/bin to fail (even if you didn't actually use any
libraries) due to multiple definitions of _onexit() and atexit().

I think you are barking up the wrong tree here, and there should be
no reason to remove msvcrt.dll from the bin directory.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to