ExtensionExport.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /****************************************************************************
  2. Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
  3. http://www.cocos.com
  4. Permission is hereby granted, free of charge, to any person obtaining a copy
  5. of this software and associated engine source code (the "Software"), a limited,
  6. worldwide, royalty-free, non-assignable, revocable and non-exclusive license
  7. to use Cocos Creator solely to develop games on your target platforms. You shall
  8. not use Cocos Creator software for developing other software or tools that's
  9. used for developing games. You are not granted to publish, distribute,
  10. sublicense, and/or sell copies of Cocos Creator.
  11. The software or tools in this License Agreement are licensed, not sold.
  12. Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
  13. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. THE SOFTWARE.
  20. ****************************************************************************/
  21. #ifndef __CCEXTENSIONEXPORT_H__
  22. #define __CCEXTENSIONEXPORT_H__
  23. #if (defined(WIN32) && defined(_WINDOWS)) || defined(WINRT) || defined(WP8)
  24. #ifdef __MINGW32__
  25. #include <string.h>
  26. #endif
  27. #if defined(CC_STATIC)
  28. #define CC_EX_DLL
  29. #else
  30. #if defined(_USREXDLL)
  31. #define CC_EX_DLL __declspec(dllexport)
  32. #else /* use a DLL library */
  33. #define CC_EX_DLL __declspec(dllimport)
  34. #endif
  35. #endif
  36. /* Define NULL pointer value */
  37. #ifndef NULL
  38. #ifdef __cplusplus
  39. #define NULL 0
  40. #else
  41. #define NULL ((void *)0)
  42. #endif
  43. #endif
  44. #elif defined(_SHARED_)
  45. #define CC_EX_DLL __attribute__((visibility("default")))
  46. #else
  47. #define CC_EX_DLL
  48. #endif
  49. #endif /* __CCEXTENSIONEXPORT_H__*/