#[Solved] @(export) doesn't seem to create any symbol exports in dll

1 messages · Page 1 of 1 (latest)

rapid rampart
#

I need some help exporting a proc from a dll. Here's the relevant proc:

package generators

@(export)
run :: proc() -> (ok: bool) {
    ok = true
    ok &&= gen_opengl_procs("src/common/renderer/opengl/procs.generated.odin")
    return
}

and the command run is:
odin build build/codegen -build-mode:dll -o:none -out:build/bin/codegen.dll

however this doesn't seem to actually export this as a symbol, as seen in the dumpbin /exports codegen.dll output:

Dump of file codegen.dll

File Type: DLL

  Summary

        2000 .data
        1000 .fptable
       16000 .odinti
        2000 .pdata
       1E000 .rdata
        3000 .reloc
       23000 .text

I also tried putting require on the proc, tried exporting random variables and even tried creating an init proc, but none of these result in exports either. The init doesn't even run when I load the dll in another program.

My compiler version is dev-2026-03-nightly:72f9d55

#

Update: tried on dev-2026-03-nightly:6d9a611, same issue

rapid rampart
#

Update: when building as an exe, the exported symbols show up in dumpbin, even if I don't reference them in main, but they don't show up if I build the same code in dll mode.

rapid rampart
#

Update: I was building the wrong directory this entire time, nevermind! Consider this solved 👍