diff --git a/wpiutil/src/main/native/include/wpi/SymbolExports.h b/wpiutil/src/main/native/include/wpi/SymbolExports.h index 6b17febe54..9ffc936d1c 100644 --- a/wpiutil/src/main/native/include/wpi/SymbolExports.h +++ b/wpiutil/src/main/native/include/wpi/SymbolExports.h @@ -14,14 +14,28 @@ #define WPILIB_DLLEXPORT __declspec(dllexport) #endif +#elif defined(WPILIB_IMPORTS) + +#ifdef __GNUC__ +#define WPILIB_DLLEXPORT __attribute__((dllimport)) +#else +#define WPILIB_DLLEXPORT __declspec(dllimport) +#endif + #else #define WPILIB_DLLEXPORT #endif -#else +#else // _WIN32 + +#ifdef WPILIB_EXPORTS #define WPILIB_DLLEXPORT __attribute__((visibility("default"))) +#else +#define WPILIB_DLLEXPORT #endif +#endif // _WIN32 + // Synopsis // // This header provides macros for using FOO_EXPORT macros with explicit