Installation#

This guide explains how to install and use the pre-built OUCH 5.0 client library in your application.

Prerequisites#

  • C++ Compiler: C++17 support required for using the library

    • GCC 7+ (Linux) - C++17 support

    • MSVC 2017+ (Windows) - C++17 support

    • Clang 5+ (macOS/Linux) - C++17 support

    Note: The public API uses C++17 features (std::optional, std::string_view, if constexpr).

  • CMake: Version 3.15 or higher (for CMake-based projects)

Installing the Library#

The OUCH 5.0 library is distributed as pre-built binaries with headers. Installation steps depend on your distribution format.

Standard Installation#

If you received the library as a package or archive:

  1. Extract the library package to your desired location (e.g., /usr/local or C:\Program Files\OUCH5)

  2. Verify the installation structure:

    install/
    ├── include/
    │   └── nasdaq/
    │       └── ouch50/
    │           ├── Session.h
    │           ├── Messages.h
    │           └── ...
    ├── lib/
    │   ├── libNdqOuch5.a (Linux) or NdqOuch5.lib (Windows)
    │   └── ...
    └── cmake/
        └── NdqOuch5Config.cmake
    
  3. Set environment variables (if needed):

    • OUCH5_ROOT: Path to the library installation directory

Using the Library#

Manual Linking#

If you’re not using CMake, manually specify include and library paths:

Linux/macOS:

g++ -std=c++20 your_app.cpp \
    -I${OUCH5_ROOT}/include \
    -L${OUCH5_ROOT}/lib \
    -lNdqOuch5 \
    -o your_app

Windows (MSVC):

cl /std:c++20 your_app.cpp ^
    /I"%OUCH5_ROOT%\include" ^
    /link /LIBPATH:"%OUCH5_ROOT%\lib" NdqOuch5.lib

Include Headers#

#include <nasdaq/ouch50/Session.h>
#include <nasdaq/ouch50/Messages.h>
#include <nasdaq/ouch50/Types.h>

Runtime Dependencies#

The library has no runtime dependencies. All dependencies are statically linked into the library binary, so you don’t need to install any additional libraries or DLLs.

Troubleshooting#

Runtime Errors#

If you encounter runtime errors:

  1. Library path: On Linux, ensure the library is in LD_LIBRARY_PATH or DYLD_LIBRARY_PATH (if using shared library build)

  2. Version mismatch: Ensure your compiler version matches the library’s build requirements (C++20)

Next Steps#