| 74 | |
| 75 | = Building Plugins = |
| 76 | |
| 77 | Plugins are one way you can add support for format drivers without embedding object code that links to auxiliary libraries that can cause linking |
| 78 | issues (usually licensing related). Currently, three drivers support building as plugins: |
| 79 | * MrSID |
| 80 | * Oracle Spatial |
| 81 | * ArcSDE (raster and vector) |
| 82 | |
| 83 | == Plugin building example == |
| 84 | |
| 85 | This example allows the building of ArcSDE support as a plugin. To build SDE support as a plugin, build GDAL as you normally would without |
| 86 | enabling any of the SDE-specific options in nmake.opt. After you have a gdal.dll, go back and edit nmake.opt to the following: |
| 87 | {{{ |
| 88 | SDE_ENABLED = YES # turn on support |
| 89 | SDE_VERSION = 91 |
| 90 | SDE_PLUGIN = YES |
| 91 | SDE_SDK = C:\arcgis\arcsde # base directory of SDE includes and libraries |
| 92 | SDE_INC = $(SDE_SDK)\include # includes directory |
| 93 | SDE_LIB = $(SDE_SDK)\lib\pe$(SDE_VERSION).lib \ |
| 94 | $(SDE_SDK)\lib\sde$(SDE_VERSION).lib $(SDE_SDK)\lib\sg$(SDE_VERSION).lib |
| 95 | }}} |
| 96 | After editing nmake.opt, cd into frmts/sde using your MSVC terminal and issue the make command: |
| 97 | {{{ |
| 98 | nmake /f makefile.vc plugin |
| 99 | }}} |
| 100 | This will build gdal_SDE.dll and link it against the gdal.dll and the SDE SDK client DLLs. After you have your gdal_SDE.dll, copy it into your |
| 101 | GDAL_DRIVER_PATH folder (you will need to explicitly set this environment variable to allow GDAL to find its plugin drivers). Your next gdalinfo |
| 102 | or gdal_translate (or any other GDAL calls) should now be able to see the driver when it goes through the driver registration process. |