How to Compile Shared Lua Library

Moderator: admin

How to Compile Shared Lua Library

Postby imxuf92 » Wed Mar 27, 2019 5:25 pm

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?
imxuf92
 
Posts: 26
Joined: Sat Jan 23, 2016 6:55 pm

Re: How to Compile Shared Lua Library

Postby Apprentice » Mon Apr 01, 2019 6:10 am

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
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 5 guests