export.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /////////////////////////////////////////////////////////////////////////////
  2. /// @file export.h
  3. /// Library symbol export definitions, primarily for Windows MSVC DLL's
  4. /// @date November 20, 2023
  5. /// @author Frank Pagliughi
  6. /////////////////////////////////////////////////////////////////////////////
  7. /*******************************************************************************
  8. * Copyright (c) 2023 Frank Pagliughi <fpagliughi@mindspring.com>
  9. *
  10. * All rights reserved. This program and the accompanying materials
  11. * are made available under the terms of the Eclipse Public License v2.0
  12. * and Eclipse Distribution License v1.0 which accompany this distribution.
  13. *
  14. * The Eclipse Public License is available at
  15. * http://www.eclipse.org/legal/epl-v20.html
  16. * and the Eclipse Distribution License is available at
  17. * http://www.eclipse.org/org/documents/edl-v10.php.
  18. *
  19. * Contributors:
  20. * Frank Pagliughi - initial implementation and documentation
  21. * Frank Pagliughi - MQTT v5 support
  22. *******************************************************************************/
  23. #ifndef __mqtt_export_h
  24. #define __mqtt_export_h
  25. #if defined(_WIN32) && defined(_MSC_VER)
  26. #if defined(PAHO_MQTTPP_EXPORTS)
  27. #define PAHO_MQTTPP_EXPORT __declspec(dllexport)
  28. #elif defined(PAHO_MQTTPP_IMPORTS)
  29. #define PAHO_MQTTPP_EXPORT __declspec(dllimport)
  30. #else
  31. #define PAHO_MQTTPP_EXPORT
  32. #endif
  33. #else
  34. #if defined(PAHO_MQTTPP_EXPORTS)
  35. #define PAHO_MQTTPP_EXPORT __attribute__ ((visibility ("default")))
  36. #else
  37. #define PAHO_MQTTPP_EXPORT
  38. #endif
  39. #endif
  40. #endif // __mqtt_export_h