NLoptNet icon indicating copy to clipboard operation
NLoptNet copied to clipboard

NLoptNet for Mac

Open arpastrana opened this issue 4 years ago • 8 comments

Hi, more of a newbie question here. Are NLoptNet's .dll files compiled and ready to use in Mac OS our would I need to do so on my computer? Thanks in advance!

arpastrana avatar Aug 09 '20 00:08 arpastrana

I don't have them compiled or included for MacOS at the moment. Now that we have things like netstandard2.0 I should probably update this library with various platform targets.

BrannonKing avatar Aug 09 '20 00:08 BrannonKing

That would be great! Just to clarify, does that mean that as it is now, NLOptNet cannot be used on Mac until the multi-platform target update you mention is made?

arpastrana avatar Aug 09 '20 00:08 arpastrana

The C# portion should work in general. Take the three *.cs files and put them into your project. Modify the "nlopt.dll" to just be "nlopt" (or whatever your shared library is named). Remove the LoadLibrary calls; you would need to have the shared libraries available next to your executable. You could compile or download them yourself.

BrannonKing avatar Aug 09 '20 02:08 BrannonKing

Thank you, I will try that. Closing this issue in the meantime.

arpastrana avatar Aug 09 '20 03:08 arpastrana

@arpastrana , it would be feasible to add this now that we have the .net core stuff working well with various platforms. If you still need this, let me know.

BrannonKing avatar Aug 26 '22 15:08 BrannonKing

@BrannonKing Thanks for keeping this thread in your radar! I don't need this feature anymore at this time, but perhaps another person will eventually? Good day.

arpastrana avatar Aug 26 '22 15:08 arpastrana

I'm reopening this as it probably should be done. The nlopt.so file can be cross-compiled to target MacOS. It could then be added to the runtimes folder.

BrannonKing avatar Aug 26 '22 15:08 BrannonKing

In that case, I am going to stay tuned for the release!

arpastrana avatar Aug 26 '22 15:08 arpastrana