LD_LIBRARY_PATH ... call executables and dynamic libraries
-
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!
-
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.htmlP.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.
Advertisement