In wasm_export.h, WASM_RUNTIME_API_EXTERN defaults to __attribute__((visibility("default"))) on non-Windows platforms:
#ifndef WASM_RUNTIME_API_EXTERN
#if defined(_MSC_BUILD)
#if defined(COMPILING_WASM_RUNTIME_API)
#define WASM_RUNTIME_API_EXTERN __declspec(dllexport)
#else
#define WASM_RUNTIME_API_EXTERN __declspec(dllimport)
#endif
#elif defined(__GNUC__) || defined(__clang__)
#define WASM_RUNTIME_API_EXTERN __attribute__((visibility("default")))
#else
#define WASM_RUNTIME_API_EXTERN
#endif
#endif
But the same does not apply to WASM_API_EXTERN, used by the wasm_c_api:
#ifndef WASM_API_EXTERN
#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
#endif
The default configuration makes it impossible to use the wasm_c_api when WAMR is built as a dynamic library on non-windows platforms.