[gdal-dev] [Fwd: RE: ogr2gui on Linux]

Even Rouault even.rouault at mines-paris.org
Sat Aug 23 17:01:41 EDT 2008


I've attached a patch that enables ogr2gui to build on Linux and run 
successfully.

I'm not sure about the 'a_wx_string.mb_str(wxConvUTF8)' stuff that may not 
work on Windows but that is necessary on Linux to get an UTF8 string instead 
of a multi-byte unicode string. That unicode stuff in wxWidget is really a 
nightmare.

But there's also a very important fix that must be applied for all platforms. 
The OGRGetDriver ( an_integer ) call must be absolutely avoided ! It depends 
on the drivers that are build in the gdal library. That may change for each 
user (it didn't work with my GDAL build). Use OGRGetDriverByName 
( "the_name_of_the_driver") instead. Another thing, when opening an OGR 
dataset, you don't need to provide the driver. This is an output of the 
OGROpen call in fact, and you can pass NULL if you're not interested by 
knowing which source driver it is.

Best regards

Even
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Gui.cpp.patch
Type: text/x-diff
Size: 5522 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080823/fd1cec0b/Gui.cpp.bin


More information about the gdal-dev mailing list