sb-config

StreamBase Compiler Environment Utility — a tool to determine and set StreamBase-related compiler and linker flags

SYNOPSIS

sb-config [OPTION]

DESCRIPTION

sb-config is a convenience utility used to set the environment for using StreamBase and Live Datamart, using the --env option. The tool is also used to set compiler and linker environment variables to settings compatible with the compiler and linker that built the library files for the current StreamBase installation.

On Linux and macOS, the options --env, --cflags, --libs, --plugin-cflags, and --plugins-ldflags emit shell lines or fragments that might contain double quotes such that any spaces in the emitted line do not break up a variable definition or a command line option. This behavior interacts as expected with the shell eval command and with back quote operators.

On Windows, macOS, and Linux, the --java, --javac, and --classpath options do not put quotes around emitted paths that contain spaces, because the output of these options is likely to be combined with other members of a PATH or CLASSPATH variable. If your StreamBase installation path contains spaces, you might need to make sure your script or Makefile uses double quotes around the expansion of the sb-config output that you capture in a variable.

OPTIONS

--cflags  (Linux and macOS only)

Returns the C++ compiler flags required for building StreamBase C++ client applications. Use this option in Makefiles, in statements such as SB_CLIENT_CFLAGS=`sb-config --cflags`.

--classpath  (Linux, macOS, and Windows)

Returns the path to the StreamBase client library JAR file that must be added to the class path when building and running StreamBase Java client applications.

--cxx  (Linux and macOS only)

Returns the path to the default C++ compiler detected on your system. Use this option in Makefiles in statements such as CXX=`sb-config --cxx`.

--env  (Linux, macOS, and Windows)

Returns, but does not execute, the commands to set environment variables for running StreamBase utilities (Windows) or for running and building StreamBase client applications (UNIX). Use the output of sb-config --env with eval or a similar command to execute the commands returned. For Windows and UNIX, returns a setting for STREAMBASE_HOME and prepends the StreamBase bin directory to the PATH. For UNIX, also returns settings for LD_LIBRARY_PATH and MANPATH.

--help, -h  (Linux, macOS, and Windows)

Displays a usage message, then exits. Entering sb-config with no arguments also shows usage.

--java  (Linux, macOS, and Windows)

Returns the path to the Java command used by the current StreamBase installation.

--javac  (Linux, macOS, and Windows)

Returns the path to the Java compiler used by the current StreamBase installation.

--libs  (Linux and macOS only)

Returns the C++ linker flags appropriate for building StreamBase C++ client applications.

--no-logging-backend  

This option is obsolete and unnecessary in StreamBase and Live Datamart version 10 and later.

--plugin-cflags  (Linux and macOS only)

Returns the C++ compiler flags appropriate for building StreamBase C++ plug-ins. On most systems, this returns the same value as --cflags.

--plugin-ldflags  (Linux and macOS only)

Returns the C++ linker flags appropriate for building StreamBase C++ plug-ins.

--pypath  (Linux and Windows only)

Returns the path to the appropriate version of the StreamBase Python Client library to use to match the default version of Python detected on your system. Use this option when setting the PYTHONPATH environment variable. For example: export PYTHONPATH=`sb-config --pypath`:$PYTHONPATH.

On Windows, this option requires the presence of a Windows Python installation such as ActiveState Python, with the python command available in the PATH.

--setenv  (Windows only)

TIBCO recommends using a StreamBase Command Prompt instead of this option for all interaction with StreamBase command-line tools.

This option modifies the Windows registry to add PATH and STREAMBASE_HOME settings appropriate for the current version of StreamBase to the environment for the currently logged-in Windows user. Do not use this option if you have more than one StreamBase version installed, which each has its own StreamBase Command Prompt appropriate to each version.

--setsysenv  (Windows only)

Same as --setenv, but modifies the system environment for all Windows users on the current machine.

--version  (Linux, macOS, and Windows)

Returns version information and exits.

EXAMPLES

The following examples are for use at the UNIX shell prompt, or at the Bash prompt of a UNIX-like environment under Window such as Cygwin.

The next line sets the CXX environment variable to the path to the compiler used to build the StreamBase libraries and binaries in the current release of StreamBase.

CXX=`sb-config --cxx`

The following line uses the specified compiler ($CXX) to compile MyApplication.cpp, using the same compiler flags used to build the StreamBase libraries (sb-config --cflags). (The -c and -o are options to the compiler, not to sb-config.)

$CXX MyApplication.cpp `sb-config --cflags` -c -o MyApplication.o

The next line links the object file generated by the above line.

$CXX MyApplication.o `sb-config --libs` -o MyApplication

The next lines show examples for building StreamBase C++ plug-ins instead of client applications.

$CXX MyPlugin.cpp `sb-config --plugin-cflags` -c -o MyPlugin.o

$CXX `sb-config --plugin-ldflags` MyPlugin.o -o MyPlugin.so

The next lines show how to compile and run a StreamBase Java client application.

javac -classpath `sb-config --classpath` MyApplication.java

java -classpath `sb-config --classpath`:. MyApplication