Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

External library (.so) not found in linking process on OS X

External library (.so) not found in linking process on OS X

I've made an external library file (.so) that should linked with the model, but when gcc tries to link it does not find the library. The library resides in the same catalog as the .mo file. I've recognized that the gcc - command that is executed does not include -L.

Is it possible to add a path to omc such that it finds the external library? If not, where should the external library file reside?

Thanks in advance!

Re: External library (.so) not found in linking process on OS X

Hi,

You can use the environment variable MODELICAUSERCFLAGS=-Wl,-Ldirectory or you can use the LibraryDirectory annotation:
annotation(LibraryDirectory="directory");

Cheers,
Adrian Pop/

There are 0 guests and 0 other users also viewing this topic
You are here: