#885: WinGrass: displaying r.external-linked raster data not working
------------------------------+---------------------------------------------
  Reporter:  hellik           |       Owner:  [email protected]
      Type:  defect           |      Status:  new                      
  Priority:  critical         |   Milestone:  6.4.0                    
 Component:  Display          |     Version:  svn-releasebranch64      
Resolution:                   |    Keywords:  r.external, WinGrass     
  Platform:  MSWindows Vista  |         Cpu:  x86-32                   
------------------------------+---------------------------------------------
Comment (by glynn):

 Replying to [comment:8 hellik]:
 > I couldn't find nm for mingw/msys/gnuwin32 on the net... :o(

 It should be part of the core MinGW package (it's part of binutils).

 > in the output from Dependency Walker there is gdal15 mentioned (see
 screenshot)

 The following change makes linked maps work with the GDAL library from
 OSGeo4W:

 {{{
 Index: gdal.c
 ===================================================================
 --- gdal.c      (revision 40542)
 +++ gdal.c      (working copy)
 @@ -102,11 +102,19 @@
  {
      load_library();

 +# ifdef _WIN32
 +    pGDALAllRegister   = get_symbol("_gdalallregis...@0");
 +    pGDALOpen          = get_symbol("_gdalo...@8");
 +    pGDALClose         = get_symbol("_gdalcl...@4");
 +    pGDALGetRasterBand = get_symbol("_gdalgetrasterb...@8");
 +    pGDALRasterIO      = get_symbol("_gdalraste...@48");
 +#else
      pGDALAllRegister   = get_symbol("GDALAllRegister");
      pGDALOpen          = get_symbol("GDALOpen");
      pGDALClose         = get_symbol("GDALClose");
      pGDALGetRasterBand = get_symbol("GDALGetRasterBand");
      pGDALRasterIO      = get_symbol("GDALRasterIO");
 +#endif
  }

  #else /* GDAL_DYNAMIC */
 }}}

 However: this would probably need to change for a 64-bit version of GDAL,
 as the sizes of the various types are different (does 64-bit even use
 stdcall? IIRC, it was originally chosen due to it reducing code size, but
 that was back in the days of "640K is more than enough for any
 application").

 Also, the example given [http://msdn.microsoft.com/en-
 us/library/ms683212%28VS.85%29.aspx here] doesn't use a decorated name,
 even though this is the standard for all Windows system functions (except
 for variadic functions, which have to use ccall).

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/885#comment:11>
GRASS GIS <http://grass.osgeo.org>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to