I compiled C++ Boost using XCode and OpenNest C# is compiled using Visual Studio.
It works on my MacBook Air computer, and I hope it works for somebody else as well. Let me know if the main OpenNest component works on your computer too. It was quite a new experience for me using Mac OS.
Boost had to be compiled under mac os as a dylib. And PInvoke decoration is a bit different than windows. I hope it works for more people than me. This was my first experience with mac…
I also need to check optimizations if I compiled on debug, release, or x64. At least this is the first working version.
When compiling C++, you should chose Release for well building releases. Debug feeds more options to the compiler meant for debugging purposes that are unnecessary for releases and eat up some performance. Release on the other hand usually includes optimizations and doesn’t collect any debugging information.
I have no idea about x64, since everything on modern macOS is x64. x86 was given up in macOS some time ago. Windows 11 won’t support the standard any more either (I believe).
These build profiles are not set in stone though. You can customize them to your liking.
Thanks, it seems Boost debug and release mode works in a similar speed.
You gave good clues when noting the equivalent to Windows .dylib and PInvoke as discussed there:
I think it would be good to make a tutorial about PInvoke, there are some resources, but individual steps are a little bit confusing. And I still believe I need to learn quite a lot more.
On my side, apple did not like it, because it couldn’t verify the .dylib file. It’s no big deal because one can always authorize it through System Preferences, but it could lead some to problems. French screenshot of the error :
I fear that it might not as the screenshot above seems to be from macOS’s Gatekeeper and related to Notarization. Gatekeeper is a bit of a black-box, so I cannot say for sure just yet. It is possible that all that needs to happen is that the native .dylib needs to be code signed…but either way, the unfortunately reality here is that both would require having an Apple Developer membership.
The browser is definitely flagging the dylib when downloading. Apple’s Gatekeeper adds and extended attribute to these sorts of files when downloading, so attempting to distribute via Yak is a good idea.
Bravo! Mac users are increacing. Could you make a tutorial about this transportation? I am quite interested about making plug on mac and I believe many others are as well.
I already got two inquiries today about PInvoke.
I ll make a tutorial how to perform PInvoke for Boost and CGAL next month using C++ and C#.
It is a bit tricky, but do-able.
I deleted the Yak installed version, and re-downloaded the F4R folder. I still get the security pop-up with the F4R one, and not with the Yak one : I guess it’s solved !