-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, OneLibrary only supports being built as a static library.
In order to provide support for building and using a shared library (.dll etc.) we need to call:
Windows ->
#ifdef __cplusplus
extern "C" {
#endif
__declspec(dllexport) void myfunction();
#ifdef __cplusplus
}
#endif
Unix ->
Create a file *.ld:
EXPORTS
{
myfunction;
};
Set CMake:
set_target_properties(MyLibrary PROPERTIES LINK_FLAGS "-Wl,-T,${CMAKE_SOURCE_DIR}/mylibrary.ld")
Add export-equivalent function declaration in .cpp (or .h?)
void __attribute__((visibility("default"))) myfunction();
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request