byuflowlab / Snopt.jl

Julia interface to SNOPT (must obtain a licensed copy of SNOPT separately)
MIT License
18 stars 9 forks source link

Compiled library location #3

Closed taylormcd closed 6 years ago

taylormcd commented 6 years ago

The Snopt.jl file as is requires some changes in where the Snopt shared library is located. My current setup is just to place the library in usr/local/lib and change all references to it to "libsnopt". This works ok, but I would prefer to work on a clean git branch if at all possible. Assuming the compiled library is located in a fixed location relative to Snopt.jl this shouldn't be hard to implement using the macro @__FILE__. Is there a reason the current implementation is set up the way it is?

andrewning commented 6 years ago

It already assumes a fixed location (where it is already): snopt/libsnopt. I don't need to move mine anywhere, but maybe the current directory is not on the path in Linux. We should look at how other Julia packages with external binaries handle this.

taylormcd commented 6 years ago

It must be platform specific issue then. The BinDeps package provides one example of library linking (and building), but might be overkill for this package.

andrewning commented 6 years ago

I fixed this issue as well as a few others.