SerialIO mex
SerialIO is written in C and allows you to read/write to a serial or com port.
Author: Lorgio Teodovich
Largio.
Made the following changes to the source code and got a clean compile and it runs help ok.
Haven't tried any other functionality yet.
line 32 commented out #define Thread
added cast to lines 442,458,460
Do you think it will work with these changes
Thanks
James
06 Oct 2009
SerialIO mex
SerialIO is written in C and allows you to read/write to a serial or com port.
Author: Lorgio Teodovich
Lorgio.
I am using R2009b on a 64 bit Windows 7 machine with Visual Studio 2008 as my compiler.
When I try to compile I get:
>> mex SerialIO.cpp
SerialIO.cpp
SerialIO.cpp(73) : error C3861: 'sleep': identifier not found
SerialIO.cpp(77) : error C3861: '_endthreadex': identifier not found
SerialIO.cpp(89) : error C3861: 'sleep': identifier not found
SerialIO.cpp(93) : error C3861: 'sleep': identifier not found
SerialIO.cpp(392) : error C3861: '_beginthreadex': identifier not found
SerialIO.cpp(441) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
SerialIO.cpp(442) : error C2440: '=' : cannot convert from 'void *' to 'char *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
SerialIO.cpp(458) : error C2440: '=' : cannot convert from 'const mxArray *' to 'mxArray *'
Conversion loses qualifiers
SerialIO.cpp(460) : error C2440: '=' : cannot convert from 'void *' to 'char *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
C:\PROGRA~1\MATLAB\R2009B\BIN\MEX.PL: Error: Compile of 'SerialIO.cpp' failed.
??? Error using ==> mex at 221
Unable to complete successfully.
It probably is my system confihuration. I'm not a c++ programmer.
Any Suggestions.
Thanks
James