# Setup for newbie developing native extension

**URL:** <https://forum.defold.com/t/setup-for-newbie-developing-native-extension/68876>\
**Category:** Questions\
**Created:** [July 17, 2021, 7:54pm UTC](https://forum.defold.com/t/setup-for-newbie-developing-native-extension/68876 "2021-07-17T19:54:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ross.grams](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/r/cab0a1/32.png) [@ross.grams](https://forum.defold.com/u/ross.grams)\
**Post date:** [July 17, 2021, 7:54pm UTC](https://forum.defold.com/t/setup-for-newbie-developing-native-extension/68876/1 "2021-07-17T19:54:49Z")

</div>

What kind of setup is required for a newbie trying to develop a simple native extension? Do I need to set things up to build the engine from source? Or is there some kind of toolchain to detect any errors before trying to build?

Waiting for the usual Upload-Build-Download process of running a project with modified native extensions is pretty darn slow for constant development iteration.

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [July 17, 2021, 8:45pm UTC](https://forum.defold.com/t/setup-for-newbie-developing-native-extension/68876/2 "2021-07-17T20:45:52Z")

</div>

I’m afraid there’s not any faster or more streamlined version.  
Of course you can setup a local [build server](https://github.com/defold/extender), which might speed it up a little bit (depending on where in the world you are).

E.g. when I build a (very small) example, it takes ~4s using my local build server, and ~6s using the live build server. So not a huge difference for me in Sweden (the live server is in Ireland).

Other things you can do to speed things up are to prebuild external files into static libraries (.a/.lib). This might be good for parts of the code that never changes. The downside is that you need to supply static libraries for _all_ platforms.  
(edit: I mean all the platforms that you wish to support ofc. You might only care about one platform, and that’s ok ofc)

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [July 17, 2021, 9:06pm UTC](https://forum.defold.com/t/setup-for-newbie-developing-native-extension/68876/3 "2021-07-17T21:06:48Z")

</div>

> [@ross.grams](#):
>
> Do I need to set things up to build the engine from source?

No, this will not help in this case.

> [@ross.grams](#):
>
> Or is there some kind of toolchain to detect any errors before trying to build?

One thing that will help is to install a Linter and C++ language plugin for your editor (Atom, VS Code, Sublime etc). The Linter can help detect syntax errors and so on and the language plugin will help with code completion etc

Also make sure to have the Defold SDK headers files in your path to help with auto complete suggestions. It can be downloaded from the releases page on GitHub or from [d.defold.com](http://d.defold.com)

---

<div class="post-metadata">

**Author:** ![ross.grams](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/r/cab0a1/32.png) [@ross.grams](https://forum.defold.com/u/ross.grams)\
**Post date:** [July 17, 2021, 11:46pm UTC](https://forum.defold.com/t/setup-for-newbie-developing-native-extension/68876/4 "2021-07-17T23:46:57Z")

</div>

OK, those are good answers, thanks!

We’ll see how far I go with it, I might try to set up a local build server. Heh, I get ~28 seconds on a good day, often much longer. I’m in the Northeast corner of the US, but I’m in a rural area, so I assume it’s because my internet is quite slow by modern standards.

---

<div class="post-metadata">

**Author:** ![Dong\_Wang](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dong_wang/32/28542_2.png) [@Dong\_Wang](https://forum.defold.com/u/Dong_Wang)\
**Post date:** [June 6, 2022, 12:00pm UTC](https://forum.defold.com/t/setup-for-newbie-developing-native-extension/68876/5 "2022-06-06T12:00:09Z")

</div>

How can I set up a local build server. The live build server give build errors and failed to bundle iOS application.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [June 6, 2022, 1:57pm UTC](https://forum.defold.com/t/setup-for-newbie-developing-native-extension/68876/6 "2022-06-06T13:57:41Z")

</div>

> [@Dong\_Wang](#):
>
> How can I set up a local build server

It is documented here: [GitHub - defold/extender: Native extension build server · GitHub](https://github.com/defold/extender)

Setting up a local build server is a relatively complicated process and requires a bit of experience with Docker and working with a command line prompt/terminal.

> [@Dong\_Wang](#):
>
> The live build server give build errors

What is the error you are getting?

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [June 6, 2022, 3:28pm UTC](https://forum.defold.com/t/setup-for-newbie-developing-native-extension/68876/7 "2022-06-06T15:28:32Z")

</div>

See this thread:

> [@Failed to bundle iOS application](https://forum.defold.com/t/failed-to-bundle-ios-application/71054/1):
>
> I just tried to bundle iOS application. It failed. My defold verstion is 1.3.0. Output in terminal: Downloading 1 archive(s) 0: Downloading https://github.com/defold/extension-admob/archive/master.zip 0: Status 304: Already cached Build Remote Engine... 2022-06-05 21:25:43.942 Defold[5108:30150988] NSEventModifierFlagFunction specified to -setKeyEquivalentModifierMask: for item \<NSMenuItem: 0x600003549ff0 Toggle Assets Pane, ke='Command-F6'\>, but is only supported for system-provided menu i…
