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…
Have to admit that MS really seems serious about this and is making a lot of the right sounds and saying a lot of the right things
With recent implementations they have even been matching up what they say with what they do pretty darned well
ExportingAssemblyNE.dll for Windows and ExportingAssemblyNE.dylib for MacOS
(NE stands for Native Exports)
If you look at the code it should be easy enough to understand how to call the functions, the ones named Unmanagedxxx are the ones you would use.
Declare Function UnmanagedVoidInt Lib "ExportingAssemblyNE.dll" As Integer
TextField1.Text = Str(UnmanagedVoidInt)
Trouble is, they don’t work with Xojo. Perhaps one of you much more knowledgable folks can determine why Xojo chokes on them?
Or perhaps see if they can be called from another app, like a C++ app maybe?
What version of VS are you using on Windows ?
Just for reference more than anything
edit - nm VS 2019 Community edition seems fine
That said there is a lot of stuff in the dylib that could be causing issues
There is a bunch of code in there that looks like its a runtime start up for managed code etc
I wonder if stripping everything down to just ONE unmanaged function and nothing else would be a better starting point
Possibly in this project just comment everything out except one unmanaged item to see if what lands in the dylib/dll is a LOT less and maybe that will help
Its a guess at this point
I can take a kick at this after I get some other work done so it might be a lot later tonight or tomorrow
My understanding is that the way these Native Exports functions work is that they include all the managed code. Couldn’t care less if it’s managed or not, as long as I can call it from Xojo. SO many things that just work better in C#. Xojo for the X-Plat UI, C# for the “work”.
Helpers (which I presume you mean console apps?) aren’t that interesting to me - I want libraries that can manipulate large chunks of data at high speed (and multi-threaded) while the main app has access to all of it, passing pointers back and forth to data that both sides can manipulate.