From: Celine La on

Hi, dear...

I am compiling my mex with c compiler, after configuring my mex setup, and reading option files from dialogue. I input my command as below.

>>mex -f C:\MATLAB\bin\win32\mexopts\msvc*.bat -ID:\..\..\include test.c

As you can see above, I have indicated option file as well as header file locations. (I omitted the exact bat file name and the first two folders of D directory above, but I have determined the absolute path, in my actual command). Current directory is at the MEX-function\function where my test.c file is located.

But error reports that...
-------------------------------------------------------------------------------------------------------------------
test.c: fatal error C1083:can not open include file:'test.h':No such a file or directory.
C:\matlab\bin\win32\mex.pl:ERROR:compile of test.c failed.
------------------------------------------------------------------------------------------------------------------

As another approach, if setting the include folder as a current directory, then mexing test.c, then error reports it can't find test.c.

Does MAtlab differentiate '\' and 'W' like a syntax error? That's why it can't find the location? -_-;

How can I get out of this?

thank you,
La.
From: James Tursa on
"Celine La" <helio_22(a)naver.com> wrote in message <hoi5cr$g0s$1(a)fred.mathworks.com>...
>
> Hi, dear...
>
> I am compiling my mex with c compiler, after configuring my mex setup, and reading option files from dialogue. I input my command as below.
>
> >>mex -f C:\MATLAB\bin\win32\mexopts\msvc*.bat -ID:\..\..\include test.c

Make the directory that contains test.c your current directory and try the function form of the mex command. e.g., like this:

mex('-f','C:\MATLAB\bin\win32\mexopts\msvc*.bat','test.c')

James Tursa
 | 
Pages: 1
Prev: Get string from file
Next: About eye detection