View Single Post
Old 03-09-2013, 07:21 AM   #23
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by greektardis View Post

cd $(dirname "$0")
LD_LIBRARY_PATH=.
export LD_LIBRARY_PATH

Now what guys?
Fix the above three statements.

1) You can't be certain that the current working directory will remain unchanged.
Don't include the current working directory in any *nix path.
This isn't a Windows FHS plan, it is the Linux FHS plan.

2) Don't assume that LD_LIBRARY_PATH is empty when this is entered. Always include its current setting with your additions.

3) Use the information you have on hand in those three statements to provide an absolute path to your application's library files.
knc1 is offline   Reply With Quote