Page 1 of 1

How to Compile Shared Lua Library

PostPosted: Wed Mar 27, 2019 5:25 pm
by imxuf92
Is there a way to compile a shared lua library file?

If the file isn't actually an indicator, but instead a file of shared functions, then a "There is no Init() function in file ..." error message is returned by the Debugger.

Is there a workaround for this? How can a shared library lua file be compiled for use with other compiled indicators?

Additionally, it seems that an indicator can't actually read a complied ".bin" file. Is that also correct?

Re: How to Compile Shared Lua Library

PostPosted: Mon Apr 01, 2019 6:10 am
by Apprentice
You can add external function to Lua file.
To call it from indicator simply add.
dofile(core.app_path() .. "\\external_library.lua");


Example of how you can use/pack your external functions to the dll.
viewtopic.php?f=17&t=13334