sciapp / gr

GR framework: a graphics library for visualisation applications
Other
329 stars 55 forks source link

MacOS prebuilt binary uses wrong dynamic library extension #82

Open staticfloat opened 5 years ago

staticfloat commented 5 years ago

The macOS prebuilt binary tarball has files such as libGR.so, when really it should be libGR.dylib. This causes trouble when using programming languages that automatically search for "properly named" dynamic objects (appending .dll on Windows, .dylib on macOS, .so elsewhere, etc....). While it is always possible to override this behavior, it is undesirable and also conflicts with system linkers attempting to compile code against the libraries via gcc -lgr ....

Simply re-naming and re-linking the libraries doesn't quite work because they have paths embedded within themselves to directly dlopen() plugins and such.

jheinen commented 5 years ago

So GRDIR=/usr/local/gr; cc -I${GRDIR}/include -L${GRDIR}/lib -Wl,-rpath,${GRDIR}/lib -lGR example.c -o example as described here doesn't work for you?

GlenHenshaw commented 4 years ago

I second this. GR for Julia is broken for me because of this issue. It's trying to load libGR.so.dylib, which of course doesn't exist.