Thanks, Norm. I was thinking that a .dll would only work on Windows and MacOS/Liinux needed .dylibs or something very different.
I thought with this unmanageddll library, COM was not something that was used?
Windows, no problem. MacOS, can’t seem to get things working.
On MacOS, I have the build step to copy the dll to the framework folder, but it’s not working.
If I leave “soft” unchecked on the external definition, I get this error:
Linking Executable ld: framework not found ClassLibrary1.dll
If I check “soft”, it runs, but when I call the function I get “FunctionNotFoundExeception”
well to call it on macOS it would have to BE a dylib on macOS
but thats just the specific format for the platforms “dynamic library” - on Windows its a DLL on macOS its a dylib on Linux its a .so
I have no experience with doing with with C# so take this with a grain of salt
I just looked at the link you’d posted and saw there was COM in that
If you’re not using COM then it shouldnt be a problem
Its all good, there is no rush. Here are the errors that I have along with the instructions on trying to get it running:
Start Visual Studio 2019 in administrator mode
Create a new project button
Create a ‘Class Library (.NET Framework) ->Next
Save file as ‘XojoCL’
Go to the toolbar: Tools->NuGet package manager->Package Manager Console
a. A Package manager console tab is opened at the bottom of the Visual Studio IDE with ‘PM>’
PM> ‘Install-Package UnmanagedExports -Version 1.2.7
Press enter to install this package.
Select Build->Configuration Manager
a. Active solution configuration->Release
b. Active solution platform->New->x64
Tools->NuGet Project Manager->Manage NuGet Packages for Solution
Of course, after all the hoops I tried jumping through to get to work x-plat, I no longer can get the Windows one to work anymore.
BUT, it looks like this functionality will be coming to a .NET near you…
Scroll down about half way to the section called “Native Exports”. Seems like they have some work to do, but this certainly looks promising, especially since they specifically state it’ll be x-plat.
I’m going to play with the code they linked to and see if I can get something working.
It’s unfortunate that Xojo gives no more details to what the exact problem is other than “function not found” if the format of the dll is not to it’s liking…