I have problems importing SMILE into Matlab.
Matlab gives the opportunity to import java classes or DLLs into Matlab but I failed in my attempts, I tried win and solaris, java and c source and binaries no luck.
Did anyone have luck with that?
thx
SMILE in Matlab
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: SMILE in Matlab
The DLLs that Matlab can import must contain C-style functions to avoid name mangling. Can you post the .h file with prototypes of functions exported from your .DLL?frito wrote:Matlab gives the opportunity to import java classes or DLLs into Matlab but I failed in my attempts
Re: SMILE in Matlab
shooltz wrote:The DLLs that Matlab can import must contain C-style functions to avoid name mangling. Can you post the .h file with prototypes of functions exported from your .DLL?frito wrote:Matlab gives the opportunity to import java classes or DLLs into Matlab but I failed in my attempts
It's not my DLL's I tried to hook the whole SMILE framework to matlab using the provided header files...
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: SMILE in Matlab
SMILE (the core C++ library) is distributed as static lib. Matlab needs the dynamic library, and the only DLLs we provide are smilenet.dll - the .NET wrapper and jsmile.dll - the native part of Java wrapper. Both of these DLLs are not compatible with Matlab.
What you need is your own .dll linked statically with smile library exposing the required functionality, as described here:
http://www.mathworks.com/access/helpdes ... 4dfi7.html
What you need is your own .dll linked statically with smile library exposing the required functionality, as described here:
http://www.mathworks.com/access/helpdes ... 4dfi7.html
Re: SMILE in Matlab
shooltz wrote:SMILE (the core C++ library) is distributed as static lib. Matlab needs the dynamic library, and the only DLLs we provide are smilenet.dll - the .NET wrapper and jsmile.dll - the native part of Java wrapper. Both of these DLLs are not compatible with Matlab.
What you need is your own .dll linked statically with smile library exposing the required functionality, as described here:
http://www.mathworks.com/access/helpdes ... 4dfi7.html
thx for the clarification.
I wanted to avoid C coding because I am much better at Matlab and dont have much time for development.
I dont know how libraries work in C++, is it possible for u to release DLLs that could be called from Matlab?
And what about your java classes I tried to load them to Matlab but with no luck either?
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: SMILE in Matlab
That's highly unlikely. Basically, we'd have to flatten the entire class hierarchy to expose SMILE functionality as C functions.frito wrote:I dont know how libraries work in C++, is it possible for u to release DLLs that could be called from Matlab?
"How libraries work in C++" is pretty simple. To create your Matlab/SMILE interface you'd have to design a set of C functions exposing high-level functionality specific to your project, then implement them with SMILE calls. The entire package would be single native DLL linked statically with SMILE.
Hard to tell. Did you ensure that jsmile.dll was visible to JVM?And what about your java classes I tried to load them to Matlab but with no luck either?
Re: SMILE in Matlab
shooltz wrote:That's highly unlikely. Basically, we'd have to flatten the entire class hierarchy to expose SMILE functionality as C functions.frito wrote:I dont know how libraries work in C++, is it possible for u to release DLLs that could be called from Matlab?
"How libraries work in C++" is pretty simple. To create your Matlab/SMILE interface you'd have to design a set of C functions exposing high-level functionality specific to your project, then implement them with SMILE calls. The entire package would be single native DLL linked statically with SMILE.
That means building kind of a custom wrapper(dunno if am using the jargon right)?
Dunno how to accomplish that thou.
How do I check that?shooltz wrote:Hard to tell. Did you ensure that jsmile.dll was visible to JVM?And what about your java classes I tried to load them to Matlab but with no luck either?
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: SMILE in Matlab
Yes, the custom wrapper sounds right.That means building kind of a custom wrapper(dunno if am using the jargon right)?
That's simple: get a C++ compiler, SMILE binaries and Matlab docs, write some code and you're doneDunno how to accomplish that thou.
Did Matlab produce any error messages? Where did you put the jsmile.dll file?How do I check that?shooltz wrote: Hard to tell. Did you ensure that jsmile.dll was visible to JVM?