diff --git a/src/inc/taos.h b/src/inc/taos.h index 5cb0420fe2e8a19d07bc08ebc89fccfc2af968d6..138fdde458a219582af5e4c073326488668fa47c 100644 --- a/src/inc/taos.h +++ b/src/inc/taos.h @@ -110,7 +110,7 @@ DLL_EXPORT TAOS *taos_connect(const char *ip, const char *user, const char *pass DLL_EXPORT TAOS *taos_connect_auth(const char *ip, const char *user, const char *auth, const char *db, uint16_t port); DLL_EXPORT void taos_close(TAOS *taos); -const char *taos_data_type(int type); +DLL_EXPORT const char *taos_data_type(int type); typedef struct TAOS_BIND { int buffer_type; diff --git a/src/inc/taoserror.h b/src/inc/taoserror.h index 011da975c906323ece5526b853f45e404e03b327..29a9e52c07c900ead2381c695ddac8a26d904045 100644 --- a/src/inc/taoserror.h +++ b/src/inc/taoserror.h @@ -29,9 +29,15 @@ extern "C" { #define TAOS_SUCCEEDED(err) ((err) >= 0) #define TAOS_FAILED(err) ((err) < 0) -const char* tstrerror(int32_t err); +#ifdef _TD_GO_DLL_ + #define DLL_EXPORT __declspec(dllexport) +#else + #define DLL_EXPORT +#endif + +DLL_EXPORT const char* tstrerror(int32_t err); -int32_t* taosGetErrno(); +DLL_EXPORT int32_t* taosGetErrno(); #define terrno (*taosGetErrno()) #define TSDB_CODE_SUCCESS 0