Issue compiling plugins for Android. __declspec


I’m trying to compile for android and I’m getting:

error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes

Comping from the PLUGINNAME_API declarations, which is defined as DLLIMPORT. I feel like I must be missing something obvious? I would expect the DLLIMPORT macro to be empty for android or using the visibility specification instead of __declspec.

Anyone have any ideas whats going on with this? I’ve checked that no where in the plugin is DLLIMPORT being overwritten.


That happened to me when I copied source files from a project and passed them to a new project. But it lacked necessary things to compile.

Same issue here when I tried to package projects with plugin for Android
Appreciate any help for the issue