LD_LIBRARY_PATH ... call executables and dynamic libraries

LD_LIBRARY_PATH ... call executables and dynamic libraries

Postby gmolina1 » Sun Sep 09, 2018 12:35 am

Hello All,

I am dealing with some weird behaviour. I am trying to make SketchUp call Emp. Since Emp requires some dynamic libraries to be available, what I am doing is to add the path where they are located to the ENV["LD_LIBRARY_PATH"] (see THIS).

Then, when I call Emp from the Ruby Console, it works (I am using THIS method). However, when I call the same method from an HTMLDialog using a callback, it does not work, saying that my dynamic libraries are not available.

Any suggestions? Is this the recommended method?

THANKS!
0

gmolina1 
 

Re: LD_LIBRARY_PATH ... call executables and dynamic librari

Postby Dan Rathbun » Sun Sep 16, 2018 7:21 pm

ENV["LD_LIBRARY_PATH"] is for standalone Ruby. I'm surprised if it works at all in embedded Ruby.
Same for Open3. I've heard of nothing but problems with it under SketchUp embedded Ruby.

Suggest you try to wrap Emp using the Ruby Fiddle library ...
http://ruby-doc.org/stdlib-2.2.4/libdoc/fiddle/rdoc/Fiddle/Importer.html

P.S. - Your code is hard to read on GitHub because your indents are being replaced with 8 spaced TABs. Ruby looks best with 2 space indents. Most code editors can replace TAB with space characters as you type, and you will not get these giants indents when you post code.
0
    I'm not here much anymore. But a PM will fire email notifications.
    User avatar
    Dan Rathbun 
    PluginStore Author
    PluginStore Author
     

    SketchUcation One-Liner Adverts

    by Ad Machine » 5 minutes ago



    Ad Machine 
    Robot
     



     

    Return to Developers' Forum

    Who is online

    Users browsing this forum: No registered users and 13 guests

    Visit our sponsors: