Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How can Eclipse set the Environment variable "LD_LIBRARY_PATH" on Mac OS
How can Eclipse set the Environment variable "LD_LIBRARY_PATH" on Mac OS [message #1781803] Tue, 13 February 2018 11:25
Ivan Morelli is currently offline Ivan MorelliFriend
Messages: 1
Registered: February 2018
Junior Member
I'm going mad... I'm writing a java program that needs to use some native libraries (written in C) on Mac, and everything works fine on Eclipse: setting up a specific Configuration in "Run Configuration" adding "LD_LIBRARY_PATH" in the environment tab.

Now, this application, needs to be executed as a standalone app, so I need to execute it outside Eclipse...but if I execute the jar in the terminal just after having exported the variable:

export LD_LIBRARY_PATH="/Applications/Example.app/Contents/MacOS/lib/"


nothing works,I get the " java.lang.UnsatisfiedLinkError" exception, and printing the value of the variable I see it's empty. I have done a lot of searches on internet and as far as I understood this is happening because of "System Integrity Protection" new feature in MacOS... So apparently there is no way to set environment variables starting with DYLD_* and LD*. because they will be in any case ignored .

So, which kind of magic stuff is doing Eclipse in order to achieve this?

Any help will be appreciated...
Previous Topic:Refresh disassembly in Disassembly view
Next Topic:Convert char* representation in debug view
Goto Forum:
  


Current Time: Sun Jun 24 09:37:11 GMT 2018

Powered by FUDForum. Page generated in 0.01872 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top