Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

problem with mex

3 views
Skip to first unread message

fatih güleç

unread,
Jan 2, 2010, 1:49:03 PM1/2/10
to
I have a c-file and want to compile it. But I have these errors(which is the result of the code "mex -v unravel.c")


This is mex, Copyright 1984-2007 The MathWorks, Inc.

-> Default options filename found in C:\Documents and Settings\a\Application Data\MathWorks\MATLAB\R2008b
----------------------------------------------------------------
-> Options file = C:\Documents and Settings\a\Application Data\MathWorks\MATLAB\R2008b\mexopts.bat
MATLAB = C:\PROGRA~1\MATLAB\R2008B
-> COMPILER = lcc
-> Compiler flags:
COMPFLAGS = -c -Zp8 -I"C:\PROGRA~1\MATLAB\R2008B\sys\lcc\include" -DMATLAB_MEX_FILE -noregistrylookup
OPTIMFLAGS = -DNDEBUG
DEBUGFLAGS = -g4
arguments =
Name switch = -Fo
-> Pre-linking commands =
-> LINKER = lcclnk
-> Link directives:
LINKFLAGS = -tmpdir "." -dll "C:\PROGRA~1\MATLAB\R2008B\extern\lib\win32\lcc\mexFunction.def" -L"C:\PROGRA~1\MATLAB\R2008B\sys\lcc\lib" -libpath "C:\PROGRA~1\MATLAB\R2008B\extern\lib\win32\lcc" "C:\DOCUME~1\A\LOCALS~1\TEMP\MEX_3N~1\templib2.obj"
LINKDEBUGFLAGS =
LINKFLAGSPOST = libmx.lib libmex.lib libmat.lib
Name directive = -o "unravel.mexw32"
File link directive =
Lib. link directive =
Rsp file indicator = @
-> Resource Compiler = lrc -I"C:\PROGRA~1\MATLAB\R2008B\sys\lcc\include" -noregistrylookup -fo"mexversion.res"
-> Resource Linker =
----------------------------------------------------------------


--> lcc -c -Zp8 -I"C:\PROGRA~1\MATLAB\R2008B\sys\lcc\include" -DMATLAB_MEX_FILE -noregistrylookup -FoC:\DOCUME~1\A\LOCALS~1\TEMP\MEX_3N~1\unravel.obj -IC:\PROGRA~1\MATLAB\R2008B\extern\include -IC:\PROGRA~1\MATLAB\R2008B\simulink\include -DNDEBUG -DMX_COMPAT_32 D:\DERS\TEZZZZ\JPEG_A~1\unravel.c

lcc preprocessor warning: D:\DERS\TEZZZZ\JPEG_A~1\unravel.c:117 No newline at end of file
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 38 found `pointer to char' expected a function
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 38 operands of >> have illegal types `pointer to char' and `int'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 38 operands of | have illegal types `int' and `void'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 38 lvalue required
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 operands of = have illegal types `int' and `pointer to char'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 syntax error; found `z2' expecting `;'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 operands of = have illegal types `double' and `pointer to char'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 syntax error; found `z1' expecting `;'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 operands of * have illegal types `pointer to char' and `pointer to double'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 operands of = have illegal types `int' and `pointer to char'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 lvalue required
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 operands of = have illegal types `double' and `pointer to char'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 syntax error; found `n' expecting `;'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 operands of = have illegal types `int' and `pointer to char'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 syntax error; found `goto' expecting `;'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 missing label in goto
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 syntax error; found `=' expecting `;'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 illegal statement termination
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 skipping `='
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 syntax error; found `ac' expecting `;'
Error D:\DERS\TEZZZZ\JPEG_A~1\unravel.c: 41 too many errors

C:\PROGRA~1\MATLAB\R2008B\BIN\MEX.PL: Error: Compile of 'unravel.c' failed.

??? Error using ==> mex at 213
Unable to complete successfully.

fatih güleç

unread,
Jan 2, 2010, 1:56:02 PM1/2/10
to
Can somebody help me??

James Tursa

unread,
Jan 2, 2010, 2:44:03 PM1/2/10
to
"fatih güleç" <fatihg...@hotmail.com> wrote in message <hho4s2$f4e$1...@fred.mathworks.com>...
> Can somebody help me??

Yes. I can tell you that you have lots of coding errors. That's the most I can help based on what you have posted so far. If you want more specific help please post your code.

James Tursa

fatih güleç

unread,
Jan 2, 2010, 6:37:02 PM1/2/10
to
Thank you for your help. I checked the errors and corrected them.
0 new messages