|
NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
|
NEOGRAPH_API export/import macro for shared-library builds. More...
#include <neograph/build_config.h>Go to the source code of this file.
NEOGRAPH_API export/import macro for shared-library builds.
Public class and free-function declarations decorated with NEOGRAPH_API get the right linkage attribute on every supported platform:
NEOGRAPH_BUILDING_LIBRARY): __declspec(dllexport) on Windows, visibility("default") on Linux/macOS.__declspec(dllimport) on Windows, no-op elsewhere.The CMake target machinery sets NEOGRAPH_BUILDING_LIBRARY (a target_compile_definitions PRIVATE on each neograph_* library) and NEOGRAPH_STATIC_BUILD (when BUILD_SHARED_LIBS is OFF). Component-specific macros also receive their owning target's private build definition.
Most engine libraries use the shared NEOGRAPH_API macro. Components whose public headers are intentionally consumed by another NeoGraph DLL may define a narrower macro below. MSVC eagerly emits helpers for exported classes, so treating those cross-DLL declarations as exports can create references to implementations owned by the wrong DLL.
Definition in file api.h.