To use SpoutLibrary in your C++ application, follow these integration steps:
- Header: Include
SpoutLibrary.h in your application's header files. - Linker: Include
SpoutLibrary.lib in your project's linker settings. You can use a #pragma comment to specify the path. - Runtime: Ensure
SpoutLibrary.dll is placed in the same folder as your application's executable.
Note: When building the library yourself using Visual Studio 2022, ensure the SpoutGL folder is located at the same level as the SpoutLibrary project folder.
#include "SpoutLibrary.h"
// Specify SpoutLibrary.lib for the linker
#pragma comment(lib, "libs/SpoutLibrary.lib")
// Get a pointer to the Spout instance
// Note: 'sender' type is determined by SpoutLibrary.h
auto sender = GetSpout();
// Use functions with the library pointer
sender->OpenSpoutConsole();