ctaggart / octh

Rust bindings for GNU Octave oct.h
14 stars 4 forks source link

don't link extensions with liboctave and liboctinterp #55

Open mtmiller opened 4 years ago

mtmiller commented 4 years ago

Plugins and extensions typically don't need to link with the runtime core libraries, since the interpreter has already loaded them. Best practice is to build a plugin or extension file as a shared object with unresolved symbols, assuming the OS supports that.

On GNU/Linux, we now build oct files without an explicit link to liboctave and liboctinterp.

I tested building helloworld with the cargo:rustc-link-lib= lines removed from both build.rs files, and it works as expected for me.

I am pretty sure that these link arguments are required on Windows, and I have no idea about macOS.