Hi
EDITED To show the final process to build in mac.
I've just tested the library using macOS and Net Core 2.0.
Just preliminar, but seems to be working fine so far. Port enumerations (GetPortDescriptions/GetPortNames) don't seem to work, but reading/writing are working fine.
Just made some changes in order to build the dll on the mac, and i am writing them here, just in case anyone is interested.
Disclaimer: i was focusing on building the serial library and had some problems building gtest, so i removed the tests building . I'll try to get them to build when i have some free time. So, i don't recommend this procedure unless you know the risks of using an untested dll.
Just open the dll cmake file, /dll/serialunix/libnserial/CMakeLists.txt
, and change this line:
FRAMEWORK ON
with this:
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
FRAMEWORK OFF
else
FRAMEWORK ON
endif()
It just disables the framework if built on macos and keep it as it was in other systems.
Now you can build it. The include and library files will be located in the subfolder ./bin/usr/local
You can keep them there or copy then to your preferred location. Take into account that you need to include the path to the libraries in LD_LIBRARY_PATH so that your app can find them.
One last step. The source code is looking for a library called libnserial.so.1
, so you need to rename the library or create a symbolic link with that name. In my case, i installed the library in /usr/local/lib, so i had to create the link like this:
ln -s /usr/local/lib/libnserial.dylib /usr/local/lib/libnserial.so.1.dylib
That's it. Did not test it much, but at least i got to send/receive data using .Net core on a mac, which is great.
thanks for this awesome piece of software!!