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:
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();
Currently, OneLibrary only supports being built as a static library.
In order to provide support for building and using a shared library (
.dlletc.) we need to call:Windows ->
Unix ->
Create a file
*.ld:Set CMake:
Add export-equivalent function declaration in .cpp (or .h?)