From: jogging on
Hi, all

I am working on C MEX. When I compile c source code,
I hope to add additional include directories to c compiler
as options. So I needn't to put the required header files into
the same place.

Thanks in advance.

Best Regards
Jogging
From: Bruno Luong on
jogging <joggingsong(a)gmail.com> wrote in message <b37a8d70-f893-4819-92e8-2ba715cb4a92(a)14g2000yqa.googlegroups.com>...
> Hi, all
>
> I am working on C MEX. When I compile c source code,
> I hope to add additional include directories to c compiler
> as options. So I needn't to put the required header files into
> the same place.
>

have you read help MEX?

help MEX

Bruno
From: Malcolm McLean on
The best thing to do is to look at the mex help page.

Basically it is possible to pass all the options you want to the C compiler, which include the #include directory path and the library link path.
From: jogging on
On Aug 9, 5:08 pm, "Malcolm McLean" <malcolm.mcle...(a)btinternet.com>
wrote:
> The best thing to do is to look at the mex help page.
>
> Basically it is possible to pass all the options you want to the C compiler, which include the #include directory path and the library link path.

Thanks.
I almost forget the fact the mex is a matlab function.
I only read the External Interfaces section of help document.
Your kind assistance are greatly appreciated.

Best Regards
Jogging