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:
Extract the library package to your desired location (e.g.,
/usr/localorC:\Program Files\OUCH5)Verify the installation structure:
install/ ├── include/ │ └── nasdaq/ │ └── ouch50/ │ ├── Session.h │ ├── Messages.h │ └── ... ├── lib/ │ ├── libNdqOuch5.a (Linux) or NdqOuch5.lib (Windows) │ └── ... └── cmake/ └── NdqOuch5Config.cmakeSet environment variables (if needed):
OUCH5_ROOT: Path to the library installation directory
Using the Library#
CMake Integration (Recommended)#
If you’re using CMake in your project:
# Find the library (adjust path if needed)
find_package(NdqOuch5 REQUIRED)
# Link to your target
target_link_libraries(your_target PRIVATE NdqOuch5::NdqOuch5)
If CMake can’t find the library automatically, specify the path:
set(NdqOuch5_DIR "${OUCH5_ROOT}/cmake")
find_package(NdqOuch5 REQUIRED)
target_link_libraries(your_target PRIVATE NdqOuch5::NdqOuch5)
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#
Link Errors#
If you encounter link errors:
Verify library paths: Ensure the library is in your linker search path or specify the path explicitly
CMake not finding library: Set
NdqOuch5_DIRto point to thecmake/directory in your installationPlatform-specific: Some platforms may require additional linker flags or library ordering
Runtime Errors#
If you encounter runtime errors:
Library path: On Linux, ensure the library is in
LD_LIBRARY_PATHorDYLD_LIBRARY_PATH(if using shared library build)Version mismatch: Ensure your compiler version matches the library’s build requirements (C++20)
Next Steps#
Quick Start Guide - Start using the library
API Reference - Explore the API documentation