I need help for using in Xojo a dll I compiled from Matlab. Making this work would potentially open many possibilities since matlab offers functionality that is hard to get in Xojo.
I wrote two simple functions and executed some compile sentence I found by googling. Matlab is using visual C++ 2010 for the compilation (required install to make it work). This generated a dll and several other files (including the corresponding header files).
I have zipped all the files that were created here: https://dl.dropboxusercontent.com/u/3800071/matlab.zip
There is also a Xojo sample project in which there are two pushbuttons declaring the two functions I meant to include in the dll.
To try this I compiled the Xojo project and copied the dll to the application libs folder. Run the project and I got an functionnotfoundexception when trying to access the fucntions in the dll.
I know there are different types of dlls and that not all are compatible with Xojo, but that’s about all I know about dlls. I also don’t know much C/C++/C#/… or what the differences between them are.
- Could anyone check my project (six lines of code)?
- Could anyone explain to me what kind of dll I would need to try to generate, and what the difference with the other dlls is?
I am almost sure that the dll will require an additional framewrok (Matlab Compiler Runtime Libraries) so it is possible that it wont work on computers without matlab because of that. I did my tests on a computer with a more recent version of matlab… I will look into this myself, but still I would like to know the type of dll I should be creating.
EDIT: The framework I mentioned is indeed needed. It is freely distributable, here it is: https://dl.dropboxusercontent.com/u/3800071/MCRInstaller.exe