Skip to content

Commit

Permalink
refactor:修改宏定义
Browse files Browse the repository at this point in the history
  • Loading branch information
s12mmm3 committed Feb 8, 2024
1 parent 19977f5 commit cf47237
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions CApi/capi.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#ifndef CAPI_H
#define CAPI_H

#if defined(_MSC_VER) || defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || defined(WIN32) \
|| defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
#define Q_DECL_EXPORT __declspec(dllexport)
#define Q_DECL_IMPORT __declspec(dllimport)
#else
#define Q_DECL_EXPORT __attribute__((visibility("default")))
#define Q_DECL_IMPORT __attribute__((visibility("default")))
#endif

#if defined(CAPI_LIBRARY)
# define CAPI_EXPORT __declspec(dllexport)
# define CAPI_EXPORT Q_DECL_EXPORT
#else
# define CAPI_EXPORT __declspec(dllimport)
# define CAPI_EXPORT Q_DECL_IMPORT
#endif

#ifdef __cplusplus
Expand Down

0 comments on commit cf47237

Please sign in to comment.