Menu
Simba Technologies
Simba Technologies

SimbaEngine X SDK 10.1.3
Developing Drivers for Data Stores Without SQL

C++ on Windows

This section explains the different settings that are available on the Project Properties page in Microsoft Visual Studio 2013 or 2015. For a full listing of all compiler options, see the Microsoft MSDN documentation.

You can use the sample projects from the 5 Day Guides as an example of how to build your own custom driver. For a step-by-step example on how to build the sample projects, see the 5 Day Guides at http://www.simba.com/resources/sdk/documentation/.

Build as an ODBC Driver (a DLL) for Local Connections

The sample drivers discussed in the Build a C++ Driver in 5 Days documents are set up to build as Windows DLLs. To build your own driver as a Windows DLL, use the following settings:

  1. Set configuration type to Dynamic Library (.dll):
  2. Select Configuration Properties -> General -> Configuration Type.

  3. Link against SimbaODBC.lib. Choose the correct version of the library for release/debug, and whether MTDLL is used or not.
  4. Select Configuration Properties -> Linker -> Input -> Additional Dependencies.

  5. Set the module definition file to Exports.def included in all sample drivers:
  6. Select Configuration Properties -> Linker -> Input Module Definition File.

  7. Set the output file to a DLL name:
  8. Select Configuration Properties -> Linker -> General -> Output File.

  9. Include the DSI and Support include paths:
  10. Select Configuration Properties -> C/C++ -> General -> Additional Include Directories:

    • $(SIMBAENGINE_DIR)\Include\DSI
    • $(SIMBAENGINE_DIR)\Include\DSI\Client
    • $(SIMBAENGINE_DIR)\Include\Support
    • $(SIMBAENGINE_DIR)\Include\Support\Exceptions
    • $(SIMBAENGINE_DIR)\Include\Support\TypedDataWrapper

Note:

If your custom driver uses the SQL Engine, see Build with the SQL Engine for additional settings.

Build as a SimbaServer (an EXE) for Remote Connections

To build a driver as a stand-alone SimbaServer executable, use the following settings:

  1. Set configuration type to Application (.exe):
  2. Select Configuration Properties -> General -> Configuration Type

  3. Link against SimbaServer.lib. Choose the correct version of the library for release/debug, and whether MTDLL is used or not.

    Select Configuration Properties -> Linker -> Input -> Additional Dependencies.

    For more information on these settings, see Run-time library options.

  4. Unset the module definition file:
  5. Select Configuration Properties -> Linker -> Input-> Module Definition File.

  6. Set output file to an EXE name.
  7. Select Configuration Properties-> Linker -> General Output File.

  8. Include the DSI and Support include paths:
  9.  Select Configuration Properties -> C/C++ -> General -> Additional Include Directories:

    • $(SIMBAENGINE_DIR)\Include\DSI
    • $(SIMBAENGINE_DIR)\Include\DSI\Client
    • $(SIMBAENGINE_DIR)\Include\Support
    • $(SIMBAENGINE_DIR)\Include\Support\Exceptions
    • $(SIMBAENGINE_DIR)\Include\Support\TypedDataWrapper

Note:

If your custom driver uses the SQL Engine, see Build with the SQL Engine for additional settings.

Build with the SQL Engine

If your custom driver uses the SQL engine, use the following setting in addition to those described in Build as an ODBC Driver (a DLL) for Local Connections or Build as a SimbaServer (an EXE) for Remote Connections.

  1. Link against SimbaEngine.lib:

    Select Configuration Properties -> Linker -> Input -> Additional Dependencies.

  2. Include the SQLEngine include paths:

     Select Configuration Properties -> C/C++ -> General -> Additional Include Directories

    • $(SIMBAENGINE_DIR)\Include\SQLEngine
    • $(SIMBAENGINE_DIR)\Include\SQLEngine\AETree
    • $(SIMBAENGINE_DIR)\Include\SQLEngine\DSIExt

Run-time library options

Each Simba library file has a Debug, Debug_MTDLL, Release and Release_MTDLL version. You an choose to link against any of these versions. In order to successfully link against your chosen version of the library, your project settings must match some of the settings used to build the library:

Debug

The Debug version of the Simba libraries are the debug version that uses a statically linked C++ runtime. To use this version of the library:

  1. In Configuration Properties -> C/C++-> Preprocessor -> Preprocessor Definitions, include _DEBUG.
  2. In Configuration Properties -> C/C++ -> Code Generation -> Runtime Library, select Multi-threaded Debug (/MTd).

Debug_MTDLL

The Debug_MTDLL version of the Simba libraries are the debug version that uses a dynamically linked C++ runtime. To use this version of the library:

  1. In Configuration Properties -> C/C++-> Preprocessor -> Preprocessor Definitions, include _DEBUG.
  2. In Configuration Properties -> C/C++ -> Code Generation -> Runtime Library, select Multi-threaded Debug DLL (/MDd).

Release

The Release version of the Simba libraries are the release version that uses a statically linked C++ runtime. To use this version of the library:

  1. In Configuration Properties -> C/C++-> Preprocessor -> Preprocessor Definitions, include _NDEBUG.
  2. In Configuration Properties -> C/C++ -> Code Generation -> Runtime Library, select Multi-threaded(/MT).

Release_MTDLL

The Release_MTDLL version of the Simba libraries are the release version that uses a dynamically linked C++ runtime. To use this version of the library:

  1. In Configuration Properties -> C/C++-> Preprocessor -> Preprocessor Definitions, include _NDEBUG.
  2. In Configuration Properties -> C/C++ -> Code Generation -> Runtime Library, select Multi-threaded DLL (/MD).

Character Set

In the Visual Studio “Configuration Properties” for your DSII project, on the “General” property page, ensure that the “Character Set” property is set to “Use Unicode Character Set”. This is the default setting used in the sample driver projects.