Configuring Visual C++

This topic describes the settings for Microsoft Visual C++ you must use when compiling with the StreamBase C++ client API to build StreamBase client applications and custom functions. Use the instructions in the subsection appropriate for your compiler version:

Configuring Visual Studio .NET 2003 Projects

To build StreamBase C++ clients and custom functions, configure your Visual Studio .NET 2003 (VC 7.1) projects as described in this section.

  1. In Microsoft Visual C++ Studio, right click the project that contains your StreamBase custom C++ code and select Properties.

  2. On the Configuration pull-down menu, select All Configurations.

    • On the top-level General property sheet, set the Use Managed Extensions option to No.

    • In the C/C++ folder, select the General property sheet.

      Fill in the Additional Include Directories row with the path to the include directory of your StreamBase installation:

      streambase-install-dir\include

      Do not use the environment variable STREAMBASE_HOME to define this path (unless you have applied this variable globally as described in StreamBase Command Prompt). Instead, the easiest way to fill in this field is to use the button with three dots on the right of the field. This opens the Additional Include Directories dialog. Select a row in this dialog and use the second three-dot button to navigate to your StreamBase installation's include directory.

    • In the Linker folder, select the Input property sheet.

      Fill in the Additional Dependencies row with the following entries:

      LibsbClient.lib
      LibsbUtil.lib
      pthreads.lib
      xercesLib.lib
      WS2_32.lib
      Dbghelp.lib

      In the Additional Dependencies dialog, make sure the Inherit from project defaults checkbox is checked.

  3. On the Configuration pull-down menu, select the Debug configuration.

    • In the C/C++ folder, select the Preprocessor property sheet.

      Add the following to the Preprocessor Definitions row:

      STREAMBASE_PTHREAD_DLL

    • In the C/C++ folder, select the Code Generation property sheet.

      Select the Runtime Library pull-down menu, and select the Multi-threaded Debug DLL (/MDd)option.

    • In the Linker folder. Select the General property sheet.

      Fill in the Additional Library Directories row with:

      streambase-install-dir\lib\Debug

      As described above, do not use STREAMBASE_HOME to define this path. Use the three-dot button to navigate to the lib\Debug subdirectory of your StreamBase installation.

  4. On the Configuration pull-down menu, select the Release configuration.

    • In the C/C++ folder, select the Preprocessor property sheet.

      Add the following to the Preprocessor Definitions row:

      STREAMBASE_PTHREAD_DLL

    • In the C/C++ folder, select the Code Generation property sheet.

      Select the Runtime Library pull-down menu, and select the Multi-threaded DLL (/MD) option.

    • In the Linker folder, select the General property sheet.

      Fill in the Additional Library Directories row with:

      streambase-install-dir\lib\Release

      As described above, do not use STREAMBASE_HOME to define this path. Use the three-dot button to navigate to the lib\Release subdirectory of your StreamBase installation.

Configuring Visual Studio .NET 2005 Projects

To build StreamBase C++ clients and custom functions, configure your Visual Studio .NET 2005 (VC 8.0) projects as described in this section.

  1. In Microsoft Visual C++ Studio, right click the project that contains your StreamBase custom C++ code and select Properties.

  2. On the Configuration pull-down menu, select All Configurations.

    • In the C/C++ folder, select the General property sheet.

      Fill in the Additional Include Directories row with the path to the include directory of your StreamBase installation:

      streambase-install-dir\include

      Do not use the environment variable STREAMBASE_HOME to define this path (unless you have applied this variable globally as described in StreamBase Command Prompt). Instead, the easiest way to fill in this field is to use the button with three dots on the right of the field. This opens the Additional Include Directories dialog. Select a row in this dialog and use the second three-dot button to navigate to your StreamBase installation's include directory.

    • In the Linker folder, select the Input property sheet.

      Fill in the Additional Dependencies row with the following entries:

      LibsbClient-vc8.lib
      LibsbUtil-vc8.lib
      pthreads-vc8.lib
      xercesLib-vc8.lib
      WS2_32.lib
      Dbghelp.lib

      In the Additional Dependencies dialog, make sure the Inherit from parent or project defaults checkbox is checked.

  3. On the Configuration pull-down menu, select the Debug configuration.

    • In the C/C++ folder, select the Preprocessor property sheet.

      Add the following to the Preprocessor Definitions row:

      STREAMBASE_PTHREAD_DLL
      _CRT_SECURE_CPP_OVERLOAD_STARD_NAMES=1
      _CRT_SECURE_NO_DEPRECATE

    • In the C/C++ folder, select the Code Generation property sheet.

      Select the Runtime Library pull-down menu, and select the Multi-threaded Debug DLL (/MDd)option.

    • In the Linker folder. Select the General property sheet.

      Fill in the Additional Library Directories row with:

      streambase-install-dir\lib\Debug

      As described above, do not use STREAMBASE_HOME to define this path. Use the three-dot button to navigate to the lib\Debug subdirectory of your StreamBase installation.

  4. On the Configuration pull-down menu, select the Release configuration.

    • In the C/C++ folder, select the Preprocessor property sheet.

      Add the following to the Preprocessor Definitions row:

      STREAMBASE_PTHREAD_DLL
      _SECURE_SCL=0
      _CRT_SECURE_CPP_OVERLOAD_STARD_NAMES=1
      _CRT_SECURE_NO_DEPRECATE

    • In the C/C++ folder, select the Code Generation property sheet.

      Select the Runtime Library pull-down menu, and select the Multi-threaded DLL (/MD) option.

    • In the Linker folder, select the General property sheet.

      Fill in the Additional Library Directories row with:

      streambase-install-dir\lib\Release

      As described above, do not use STREAMBASE_HOME to define this path. Use the three-dot button to navigate to the lib\Release subdirectory of your StreamBase installation.

Back to top