Is there an annotation like `@cdecl("name")` or so...
# kotlin-native
g
Is there an annotation like
@cdecl("name")
or something similar I can use for controlling the name of an exported Kotlin function in a DLL? I have to create a DLL with a particular entrypoint function name (loaded by name, by a third-party application) and currently the only solution I can think of is to create a wrapper C file like:
Copy code
__declspec(dllexport) int Entrypoint(_args) {
  kotlinmain(_args)
}
j
Does it have to added to the export table? Else for just creating a symbol and is callable externally
Copy code
@CName(externName = "DllMethodName")
@SymbolName("DllMethodName")
Should be enough
If you need to controll the shortname @CName annotation has that as a second argument
g
Ah thank you!