SB 5.0 sbp

Questions and information about Crank Software's Storyboard Designer

Moderator: jamiev

SB 5.0 sbp

Postby zero147 » Wed Jun 21, 2017 1:34 am

hello,

In Storyboard 5.0, start sbengine with sbp.(sbengine app.sbp),but If I want to load a dynamic library in lua, how to specify dynamic library loading paths?

Thinks.
zero147
 
Posts: 33
Joined: Mon Jun 06, 2016 4:27 am

Re: SB 5.0 sbp

Postby Evan » Wed Jun 21, 2017 8:25 am

Hello,

Due to the nature of loading custom C libraries from Lua, sbengine is currently unable to do so from within a SBP package.

If you are using SBP and want to load a library from Lua, you will need to expose that library on the filesystem (for example, in the lib folder of the runtime) and modify package.cpath in your Lua script to point to where it is, like so:

package.cpath = "/path/to/moduledir/?.so;" .. package.cpath
require("mymodule")

Let me know if you have any further issues.

Evan
Evan
 
Posts: 20
Joined: Wed Aug 27, 2014 7:29 am

Re: SB 5.0 sbp

Postby zero147 » Wed Jun 21, 2017 8:11 pm

Hello Evan,

Thank you very much, by the method of path specified in the lua script successfully loaded into the dynamic libraries.
sbmodule.so has been in the path(/usr/local/qnx-6_6-armv7le-swrender-screen-obj/lib/).

package.cpath = "/usr/local/qnx-6_6-armv7le-swrender-screen-obj/lib/?.so;"..package.cpath
local sbmodule = require("sbmodule")

But I found that the SBP must contain the dynamic library(sbmodule.so) too,If not, will load failure.

Thanks.
zero147
 
Posts: 33
Joined: Mon Jun 06, 2016 4:27 am


Return to Storyboard Designer

Who is online

Users browsing this forum: Google [Bot] and 3 guests

cron