It is recommended that you first read Supported Compilers and Platforms if you haven't already to ensure you are using a supported platform and compiler. This document is broken into two sections. The first section, Compiling Basic Plug-Ins For Any Platform, Compiler, or Build Tool, describes the bare essentials needed to build plug-ins. The second section, Compiling Advanced Plug-Ins For Any Platform, Compiler, or Build Tool, expands on the first section by explaining the additional parts of the SDK that are needed when building more advanced plugins. Please note that you might want to take a look at our Visual Studio 2010 property sheets or the SCons configurations when setting up your plug-in build environment. Both are included in the SDK and are used to provide the build environment for the tutorial and sample plug-ins.
This document assumes that the SDK was unzipped to a location known as SDK_HOME. Wherever you see the word SDK_HOME, please expand that to be the directory where you unzipped this SDK.
NOTE: The SDK is split into separate files for each platform (Windows and Solaris), so even though this document is present in all versions of the SDK regardless of platform, you will need to have downloaded the SDK specific to your platform before proceeding with any of the recommendations in this document.
| Operating System | Processor | Compiler |
|---|---|---|
| Windows XP 32-bit | x86 | Visual Studio 2010 (any edition) |
| Windows XP 64-bit | x86 | Visual Studio 2010 (any edition) |
| Solaris 10 | SPARC v9 | Sun Studio 12 |
| Platform | Configuration | Architecture | C++ Compiler/Linker Setting | Full Path |
|---|---|---|---|---|
| Windows | Debug | 32-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Windows | Debug | 64-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Windows | Release | 32-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Windows | Release | 64-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Solaris | Debug | 64-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Solaris | Release | 64-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
|
| Configuration | Run-time Library | Ignore Specific Libraries |
|---|---|---|
| Debug | Multi-threaded Debug DLL (i.e. the /MDd cmpiler flag) |
|
| Release | Multi-threaded DLL (i.e. the /MD cmpiler flag) |
|
| Additional Compiler Args | -library=stlport4 -m64 -xcode=pic32 |
| Additional Linker Args | -library=stlport4 -m64 -xcode=pic32 -lnsl -ldl -lGLU -lGL -lXm -lXext -lX11 -lm |
The Interfaces provide the majority of the API that plug-ins can use to interact with Opticks. The PlugInLib provides the scaffolding code that is linked into your binary that allows Opticks to recognize it as a plug-in. The PlugInLib also provides base classes, known as shells, that you can subclass when creating your own plug-ins. The PlugInUtilities provide a number of utility classes that simplify the use of the more advanced APIs made available in Interfaces. In addition, the PlugInUtilities are compiled directly into your plug-in as a static library. As seen above creating a basic plug-in only requires using these three parts of the SDK. See Compiling Basic Plug-Ins For Any Platform, Compiler, or Build Tool for details on the compiler and linker settings for using these three parts of the SDK.
The HdfPlugInLib is a very specialized utility library. This utility library simplifies the creation of importers that read from HDF4 or HDF5 formatted files. You can see http://hdf.ncsa.uiuc.edu/ for details on HDF4 or HDF5. If you are not writing an importer for HDF4 or HDF5 files, you will not need to use this part of the SDK.
The NitfPlugInLib is a very specialized utility library. This utility library allows a plug-in developer to build custom TRE parsers that will be used by Opticks when loading NITF (National Imagery Transmission Format) files. You can see http://en.wikipedia.org/wiki/National_Imagery_Transmission_Format for more details on NITF. If you have a NITF file that you would like to load into Opticks, but Opticks does not recognize the TRE, you can use the NitfPlugInLib to write a custom TRE parser that will load the data from the TRE into Opticks. If you don't need to write a custom TRE parser for a NITF file, you will not need to use this part of the SDK.
If you are using any of these more advanced parts of the SDK, see below for the compiler and linker settings.
| Platform | Configuration | Architecture | C++ Compiler/Linker Setting | Full Path |
|---|---|---|---|---|
| Windows | Debug | 32-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Windows | Debug | 64-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Windows | Release | 32-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Windows | Release | 64-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Solaris | Debug | 64-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Solaris | Release | 64-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
|
| Platform | Configuration | Architecture | C++ Compiler/Linker Setting | Full Path |
|---|---|---|---|---|
| Windows | Debug | 32-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Windows | Debug | 64-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Windows | Release | 32-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Windows | Release | 64-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Solaris | Debug | 64-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
| |||
| Solaris | Release | 64-bit | INCLUDE directory |
|
| LIB directory |
| |||
| Libraries |
|
When compiling more advanced plug-ins you may need to compile and link against certain third-party libraries. Using certain parts of our SDK requires compiling and linking against the following third-party libraries: Xerces, xqilla, Boost, pthreads, Qt, ehs, ossim, Hdf4, and Hdf5. We provide pre-built binaries of all necessary third-party libraries on the Opticks website at https://opticks.ballforge.net/. Please see Acquiring and using 3rd party libraries for more details on acquiring those dependencies and then compiling and linking against them.