# \`DllExport("name")\` does not export symbols in Mercury Island/Windows DLLs

**URL:** https://talk.remobjects.com/t/dllexport-name-does-not-export-symbols-in-mercury-island-windows-dlls/33681
**Category:** Mercury
**Tags:** water
**Created:** [July 23, 2026, 3:31pm UTC](https://talk.remobjects.com/t/dllexport-name-does-not-export-symbols-in-mercury-island-windows-dlls/33681 "2026-07-23T15:31:44Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![syriku](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@syriku](https://talk.remobjects.com/u/syriku)
#### Post date: [July 23, 2026, 3:31pm UTC](https://talk.remobjects.com/t/dllexport-name-does-not-export-symbols-in-mercury-island-windows-dlls/33681/1 "2026-07-23T15:31:44Z")

</div>

I encountered an issue when building a native Windows DLL using Island and Mercury.

The project successfully produces a DLL, but using the documented named form of `DllExport` does not place the method in the DLL export table.

For example, this does not export `int_add`:

```vb
Public Shared Class Export

    <DllExport("int_add")>
    Public Function IntAdd(a As Int32, b As Int32) As Int32
        Return a + b
    End Function

End Class

```

The DLL builds successfully, but `int_add` does not appear in its exported symbols.

I verified the export table with:

```powershell
llvm-readobj --coff-exports .\Library.dll

```

However, splitting the export name into a separate `SymbolName` aspect, and also adding `Used`, works correctly:

```vb
Public Shared Class Export

    <DllExport>
    <SymbolName("int_add")>
    <Used>
    Public Function IntAdd(a As Int32, b As Int32) As Int32
        Return a + b
    End Function

End Class

```

With this version, `llvm-readobj` shows the expected exported symbol:

```plaintext
Name: int_add

```

I also tested the exported function by loading the DLL through `LoadLibrary`, resolving `int_add` through `GetProcAddress`, and calling it from a small C program. The function was found and returned the expected result.

The same issue does not appear to occur in Oxygene. In an equivalent Island/Windows project, the following syntax directly exports the requested symbol:

```pascal
[DllExport('int_add')]
class method IntAdd(a, b: Int32): Int32;

```

So the behavior currently appears to be:

```plaintext
Mercury:
<DllExport("int_add")>
    → symbol is not exported

Mercury:
<DllExport>
<SymbolName("int_add")>
<Used>
    → symbol is exported

Oxygene:
[DllExport('int_add')]
    → symbol is exported

```

Is this a Mercury compiler issue, or is the named `DllExport` argument not currently supported for Mercury on Island/Windows?

> Update: Water version is 13.0.0.3095 (develop)  
> Built on bajor, 20260626-193532

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [July 23, 2026, 6:32pm UTC](https://talk.remobjects.com/t/dllexport-name-does-not-export-symbols-in-mercury-island-windows-dlls/33681/2 "2026-07-23T18:32:11Z")

</div>

We can not reproduce this as-is; could you send us a small testcase?

[MercuryDllExport33681.zip](https://talk.remobjects.com/uploads/short-url/t3FEUvHh3C2TDjkLKrLmaWlAfjg.zip) (2.7 MB)

---

<div class="post-metadata">

### Author: ![syriku](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@syriku](https://talk.remobjects.com/u/syriku)
#### Post date: [July 24, 2026, 4:19pm UTC](https://talk.remobjects.com/t/dllexport-name-does-not-export-symbols-in-mercury-island-windows-dlls/33681/3 "2026-07-24T16:19:11Z")

</div>

I have recorded a video showing the complete process, including creating the project, building the DLL, and checking the exported symbols.

  
whether I made any mistake during the process?

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [July 27, 2026, 7:13pm UTC](https://talk.remobjects.com/t/dllexport-name-does-not-export-symbols-in-mercury-island-windows-dlls/33681/4 "2026-07-27T19:13:16Z")

</div>

> [@syriku](#):
>
> whether I made any mistake during the process?

Can you send us the final project from this?

---

<div class="post-metadata">

### Author: ![syriku](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@syriku](https://talk.remobjects.com/u/syriku)
#### Post date: [July 28, 2026, 3:18am UTC](https://talk.remobjects.com/t/dllexport-name-does-not-export-symbols-in-mercury-island-windows-dlls/33681/5 "2026-07-28T03:18:34Z")

</div>

ok here it is. by the way I’ve upgraded water to 1301 and the problem still comes  
[DllExport.zip](https://talk.remobjects.com/uploads/short-url/yZ0Bo4kLvjBWak4sgfNLE9CTvFb.zip) (2.7 MB)

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [July 28, 2026, 10:37am UTC](https://talk.remobjects.com/t/dllexport-name-does-not-export-symbols-in-mercury-island-windows-dlls/33681/6 "2026-07-28T10:37:20Z")

</div>

> [@syriku](#):
>
> by the way I’ve upgraded water to 1301 and the problem still comes

Thats good, i’d be worried if to went away on its own 😉

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [July 28, 2026, 8:39pm UTC](https://talk.remobjects.com/t/dllexport-name-does-not-export-symbols-in-mercury-island-windows-dlls/33681/7 "2026-07-28T20:39:10Z")

</div>

Good news, this is fixed for vNext. Would you like an interim build, or will coming Friday be sufficient?

---

<div class="post-metadata">

### Author: ![syriku](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/s/bcef8e/32.png) [@syriku](https://talk.remobjects.com/u/syriku)
#### Post date: [July 29, 2026, 3:29pm UTC](https://talk.remobjects.com/t/dllexport-name-does-not-export-symbols-in-mercury-island-windows-dlls/33681/8 "2026-07-29T15:29:37Z")

</div>

Let me test it friday
