-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export functions from DLL #5
Comments
Hello, Assuming you mean the DLL from the "lib/dynamic" folder of the distro, it is C++, the exported function names are mangled. Is that the issue? I just ran To create a DLL with exported C functions we'd need a wrapper for the C++ client. I don't know anything about GoLang... would it be easier to interface with the managed (.NET) version instead? Cheers, |
That's right by trying with the WASimCommander.WASimClient.dll as in the example with python, I didn't find any references, so I checked the WASimClient.dll which actually had the functions with mangled names. Unfortunately I also don't know much about GoLang, but from what I've searched there are no libraries like clr for python, so accessing the dll is more complex. Thanks for the answer, I'm still playing with the code so nothing serious! Thanks! |
A quick Google/StackOverflow search on interfacing Go with C++ looks promising (SWIG maybe?), but it's a bit of a swamp trying to figure out versions and what's old news and what's new (eg. https://stackoverflow.com/questions/1713214/how-to-use-c-in-go). Some later answers seem to suggest you can embed C++ code into Go (with I found a couple projects for using .NET assemblies/DLLs in Go (with I'm open to writing/having a C-style DLL wrapper for the WASimClient, which may ultimately be more useful for other bindings as well (eg. "native" Python). But if there's a way to use the current C++ code/lib, I'd say go for that. I'll leave this issue open, please update with what you think the most efficient way forward may be! Thanks, |
Hi,
i'm approaching the world of GoLang, but I can't interface with the DLL due to the functions not externally exposed.
Is it possible to expose the connection and reading functions variables from the WASimClient?
The text was updated successfully, but these errors were encountered: