# Compiling native extension lib for Windows

**URL:** <https://forum.defold.com/t/compiling-native-extension-lib-for-windows/17377>\
**Category:** Questions\
**Created:** [March 1, 2018, 10:55am UTC](https://forum.defold.com/t/compiling-native-extension-lib-for-windows/17377 "2018-03-01T10:55:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [March 1, 2018, 12:31pm UTC](https://forum.defold.com/t/compiling-native-extension-lib-for-windows/17377/2 "2018-03-01T12:31:56Z")

</div>

Agreed, we need to document this more. And I’ll add a win32 extension example as well.

For your use case, you should use the “.lib” extension for libraries on windows. And you don’t need to add any libs flags to add your own provided lib (we do that for you).

As for the C++ implementation, you shouldn’t need to link in the C++ dll’s either.

If you _do_ need to add a library from visual studio, you would write their file name like so:

```lua
x86_64-win32:
  context:
   libs: ["Ws2_32.lib"]

```

There (a little) more information [here](https://forum.defold.com/t/native-extensions/4946/133) regarding how to remove debug functionality from the engine. Notice that we specify the windows libraries by their full filename.

---

_[View the full topic](https://forum.defold.com/t/compiling-native-extension-lib-for-windows/17377)._
