Dear Forum,

My external app, which is called by Xojo using shell, requires LD_LIBRARY_PATH environment variable. I do the following to define the variable.


I can confirm this command works by showing the variable after this commend. However, my app does not run and shows an error message saying it cannot find the library folder. My app works completely fine on Terminal by setting the environment variable through .profile. Can any one shed me some lights?


Hi Choosnik,

Try this:
dim apppath as string = {PATH TO CONSOLE APP}
dim command as string = “export LD_LIBRARY_PATH=/Users/leechoonsik/myapp”+EndOfLine+apppath

Either put the LD_LIBRARY_PATH as a correctly escaped path , or add quotes as without that the path will be wrong if it contains a space



Hi Lee,

Thank you so much for your answer. I’m still trying several combinations using your clue but not successful yet. Will post once my app works.

By the way, is this problem so rare or too easy to solve that no comments have been posted? I wonder if I’m making a mistake by running an external app using shell…


We run several shell applications where we have to set an environmental variable. It’s not paths though, but something else. Is the external app a console one?