Fix compile warnings on windows platform: dll linkage and others (#604)

This commit is contained in:
Wenyong Huang
2021-04-09 14:55:58 +08:00
committed by GitHub
parent 77c3ddf7d0
commit dfe52ab42f
9 changed files with 66 additions and 53 deletions

View File

@ -10,8 +10,12 @@
#include <assert.h>
#ifndef WASM_API_EXTERN
#ifdef _WIN32
#define WASM_API_EXTERN __declspec(dllimport)
#if defined(_MSC_BUILD)
#if defined(COMPILING_WASM_RUNTIME_API)
#define WASM_API_EXTERN __declspec(dllexport)
#else
#define WASM_API_EXTERN __declspec(dllimport)
#endif
#else
#define WASM_API_EXTERN
#endif

View File

@ -12,7 +12,7 @@
#ifndef WASM_RUNTIME_API_EXTERN
#if defined(MSVC)
#if defined(_MSC_BUILD )
#if defined(COMPILING_WASM_RUNTIME_API)
#define WASM_RUNTIME_API_EXTERN __declspec(dllexport)
#else