how can i create Lua DLL with Purebasic ?

Just starting out? Need help? Post your questions and find answers here.
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 627
Joined: Fri Dec 04, 2015 9:26 pm

how can i create Lua DLL with Purebasic ?

Post by skinkairewalker »

hello everyone !!

i am learning about Lua wrapper ( https://github.com/Dadido3/Lua-PureBasic )
and I decided to create a DLL to use in Lua, with the code below:

test.dll

Code: Select all

ProcedureCDLL MyFunction()
    MessageRequester("Hello", "This is a simple DLL !", 0)
EndProcedure
  
ProcedureCDLL test()
    MessageRequester("test", "Opened", 0)
EndProcedure  
the following errors:
Error loading module 'test' from file '.\test.dll':
The specified procedure could not be found.
I found a tutorial, but I can't run it n purebasic to work... ( https://www.programmersought.com/article/40342130871/ )

lua code:

Code: Select all

mydll = require("test")
Can anyone help me?