G'day
I am trying to talk to Iow24 starter kit with Matlab and WinXP.
I tried using Matlab's native API to access the iowkit.dll but it seems that functions like IowKitWrite expects the Report values to be in hex. This is problematic as there is no way to simply send a hex string to a DLL in matlab.
The other way is to write my own C function to be used with Matlab and do the number handling there. The problem is that Matlab does not allow link with a DLL. Rather, I can only use the static library iowkit.lib file.
And I am getting linking errors during link - e.g.,
link error undefined reference IowKitWrite etc.
I would like to know if the export variables are in the static lib file.
If not, is there a version with them? I have been trying various ways of talking to matlab for several days now. It's been most annoying.
cheers.
/j
Static library link with Matlab
Moderator: Guido Körber
-
- Posts: 543
- Joined: Mon Dec 01, 2003 6:09 pm
hi, thanks for the info.Robert Marquardt wrote:The report buffer is only declared as char * (PCHAR). The content is binary data not a string of hex digits.
The .lib file is as usual only a stub file to link to the DLL.
turns out the linking error was from Matlab's default compiler. it won't work with iowkit.dll. The error I experienced with writing the ReportID was actually from incorrect byte alignment of the ReportID structure. There was no way to tell. I only found out by using VS .Net to compile my matlab dll.
cheers.
/j