Changes between Version 1 and Version 2 of VSIPreload
- Timestamp:
- May 25, 2015, 10:16:12 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
VSIPreload
v1 v2 11 11 12 12 1. Build GDAL configured with `--with-pic` 13 2. 14 {{{ 15 g++ -Wl,-soname,libgdal_vsipreload.so.1 -Wall -fPIC port/vsipreload.cpp \ 16 -shared -o libgdal_vsipreload.so.1 -Iport -L. -L.libs \ 17 -Wl,-Bstatic -lgdal -Wl,-Bdynamic -ldl -lpthread -lcurl 13 2. Build the VSIPreload library: 14 {{{ 15 g++ -Wl,-soname,libgdal_vsipreload.so.1 -Wall -fPIC \ 16 port/vsipreload.cpp \ 17 -shared -o libgdal_vsipreload.so.1 -Iport -L. -L.libs \ 18 -Wl,-Bstatic -lgdal \ 19 -Wl,-Bdynamic -ldl -lpthread -lcurl 18 20 }}} 19 21 … … 29 31 == Using vsipreload == 30 32 31 Just put LD_PRELOAD before your executable, and add the necessary /vsi... path parts to what you're doing:33 Just put `LD_PRELOAD` before your executable, and add the necessary `/vsi`... path parts to what you're doing: 32 34 33 35 {{{ 34 $ LD_PRELOAD=" /home/vagrant/host/c/gdal/libgdal_vsipreload.so.1" ls /vsizip/vsicurl/http://svn.osgeo.org/gdal/trunk/autotest/ogr/data/poly.zip36 $ LD_PRELOAD="./libgdal_vsipreload.so.1" ls /vsizip/vsicurl/http://svn.osgeo.org/gdal/trunk/autotest/ogr/data/poly.zip 35 37 poly.dbf poly.PRJ poly.shp poly.shx 36 38 }}}