diff options
-rw-r--r-- | opentrack-api/context.cpp | 6 | ||||
-rw-r--r-- | opentrack-api/opentrack.h | 20 |
2 files changed, 11 insertions, 15 deletions
diff --git a/opentrack-api/context.cpp b/opentrack-api/context.cpp index eb5b8a58..5b218f93 100644 --- a/opentrack-api/context.cpp +++ b/opentrack-api/context.cpp @@ -93,17 +93,17 @@ opentrack_ctx::~opentrack_ctx() extern "C" { -const char** opentrack_enum_trackers(opentrack ctx) +const char** OPENTRACK_EXPORT opentrack_enum_trackers(opentrack ctx) { return const_cast<const char**>(ctx->list); } -opentrack opentrack_make_ctx(int argc, char** argv, void* window_parent) +opentrack OPENTRACK_EXPORT opentrack_make_ctx(int argc, char** argv, void* window_parent) { return new opentrack_ctx(argc, argv, window_parent); } -void opentrack_finalize_ctx(opentrack foo) +void OPENTRACK_EXPORT opentrack_finalize_ctx(opentrack foo) { delete foo; } diff --git a/opentrack-api/opentrack.h b/opentrack-api/opentrack.h index 63136abc..b0883d50 100644 --- a/opentrack-api/opentrack.h +++ b/opentrack-api/opentrack.h @@ -15,11 +15,7 @@ typedef struct opentrack_opaque_tracker* opentrack_tracker; # ifdef _WIN32 # define OPENTRACK_EXPORT __declspec(dllexport) # else -# ifdef __GNUC__ -# define OPENTRACK_EXPORT __attribute__((visibility ("default"))) -# else -# define OPENTRACK_EXPORT -# endif +# define OPENTRACK_EXPORT # endif #else # ifdef _WIN32 @@ -42,20 +38,20 @@ enum opentrack_dof { }; #endif -opentrack opentrack_make_ctx(int argc, char** argv, void* window_parent); -void opentrack_finalize_ctx(opentrack self); +opentrack OPENTRACK_EXPORT opentrack_make_ctx(int argc, char** argv, void* window_parent); +void OPENTRACK_EXPORT opentrack_finalize_ctx(opentrack self); /* no need to free the return value; invalid to modify it */ -const char** opentrack_enum_trackers(opentrack self); +const char** OPENTRACK_EXPORT opentrack_enum_trackers(opentrack self); /* * don't `opentrack_tracker_tick an unstarted tracker, it's invalid to do so * it's also invalid to start a finalized tracker */ -opentrack_tracker opentrack_make_tracker(opentrack ctx, const char* name); -void opentrack_tracker_start(opentrack self, opentrack_tracker tracker); -int opentrack_tracker_tick(opentrack_tracker tracker, double* headpose); -void opentrack_finalize_tracker(opentrack_tracker tracker); +opentrack_tracker OPENTRACK_EXPORT opentrack_make_tracker(opentrack ctx, const char* name); +void OPENTRACK_EXPORT opentrack_tracker_start(opentrack self, opentrack_tracker tracker); +int OPENTRACK_EXPORT opentrack_tracker_tick(opentrack_tracker tracker, double* headpose); +void OPENTRACK_EXPORT opentrack_finalize_tracker(opentrack_tracker tracker); #ifdef __cplusplus } #endif |