# Issue compiling plugins for Android. \_\_declspec

**URL:** <https://forums.unrealengine.com/t/issue-compiling-plugins-for-android-declspec/143936>\
**Category:** Mobile\
**Tags:** unreal-engine, Android\
**Created:** [May 18, 2020, 6:48pm UTC](https://forums.unrealengine.com/t/issue-compiling-plugins-for-android-declspec/143936 "2020-05-18T18:48:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Mac](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Andrew\_Mac](https://forums.unrealengine.com/u/Andrew_Mac)\
**Post date:** [May 18, 2020, 6:48pm UTC](https://forums.unrealengine.com/t/issue-compiling-plugins-for-android-declspec/143936/1 "2020-05-18T18:48:05Z")

</div>

Hello,

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

```auto

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.

Thanks,  
Andrew.

---

<div class="post-metadata">

**Author:** ![pablof\_a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@pablof\_a](https://forums.unrealengine.com/u/pablof_a)\
**Post date:** [May 27, 2020, 12:22pm UTC](https://forums.unrealengine.com/t/issue-compiling-plugins-for-android-declspec/143936/2 "2020-05-27T12:22:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![g\_test](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@g\_test](https://forums.unrealengine.com/u/g_test)\
**Post date:** [July 10, 2022, 10:03am UTC](https://forums.unrealengine.com/t/issue-compiling-plugins-for-android-declspec/143936/3 "2022-07-10T10:03:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [March 17, 2024, 7:21am UTC](https://forums.unrealengine.com/t/issue-compiling-plugins-for-android-declspec/143936/5 "2024-03-17T07:21:09Z")

</div>

same here

---

<div class="post-metadata">

**Author:** ![g\_test](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@g\_test](https://forums.unrealengine.com/u/g_test)\
**Post date:** [March 18, 2024, 6:25am UTC](https://forums.unrealengine.com/t/issue-compiling-plugins-for-android-declspec/143936/6 "2024-03-18T06:25:12Z")

</div>

maybe cause of other plugin’s interference, try to disable them

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [March 18, 2024, 6:35am UTC](https://forums.unrealengine.com/t/issue-compiling-plugins-for-android-declspec/143936/7 "2024-03-18T06:35:39Z")

</div>

in my case it’ s a plugin i need to use. so i can’t disable it.

---

<div class="post-metadata">

**Author:** ![g\_test](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@g\_test](https://forums.unrealengine.com/u/g_test)\
**Post date:** [March 18, 2024, 6:44am UTC](https://forums.unrealengine.com/t/issue-compiling-plugins-for-android-declspec/143936/8 "2024-03-18T06:44:59Z")

</div>

Any other plugin other than the default ones enabled?

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [March 18, 2024, 6:48am UTC](https://forums.unrealengine.com/t/issue-compiling-plugins-for-android-declspec/143936/9 "2024-03-18T06:48:47Z")

</div>

thanks but nopes. like i said. the \_\_declspec is in a plugin i need. i know it’ s in that plugin.  
i would need to actually fix the issue. to use the plugin.
