From: kk KKsingh on
Walter Roberson <roberson(a)hushmail.com> wrote in message <0SpJn.36306$304.11049(a)newsfe12.iad>...
> kk KKsingh wrote:
>
> > oh yes sorry ! Following is the error
> >
> > Attempt to execute Script nfftmex as a function
> > /path/..../nfftmex.m
> >
> > Error in nfft_init_1d at 23
> > p = nfftmex('init_1d',N,M);
>
> That certainly tries to use nfftmex as a function. What are the first
> few lines of nfftmex.m ? If it is just the documentation, then the error
> you are seeing would be consistent with it not finding the mex object
> file in the path. The mex object file should be in the same directory as
> the documentation so that the help information is found.
>
> http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_prog/f10-60956.html#f10-60987
>
> See "Precedence Rules" and "File Precedence" there.


I got the reason for one error folder was not in path ! can any one tell me how can i set path in unix server without using GUI

after putting everything in path following is error i am getting when using mex nfftmex.c

mex nfftmex.c
nfftmex.c:30:26: error: mexversion.c: No such file or directory
nfftmex.c:43: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
nfftmex.c:55: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
nfftmex.c:73: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
nfftmex.c:96: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
nfftmex.c:116: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
nfftmex.c:122: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;int&#8217;

mex: compile of ' "nfftmex.c"' failed.

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

I have no idea what mexversion.c is

its one of the files used in nfftmex.c following are lines

#include <complex.h>
#include <string.h>
#include <stdio.h>
#include "nfft3.h"
#include "infft.h"
#include "nfft3util.h"
#include "imex.h"

#ifdef HAVE_MEXVERSION_C
#include "mexversion.c"
#endif
From: kk KKsingh on
"kk KKsingh" <akikumar1983(a)gmail.com> wrote in message <ht5gi5$o78$1(a)fred.mathworks.com>...
> Walter Roberson <roberson(a)hushmail.com> wrote in message <0SpJn.36306$304.11049(a)newsfe12.iad>...
> > kk KKsingh wrote:
> >
> > > oh yes sorry ! Following is the error
> > >
> > > Attempt to execute Script nfftmex as a function
> > > /path/..../nfftmex.m
> > >
> > > Error in nfft_init_1d at 23
> > > p = nfftmex('init_1d',N,M);
> >
> > That certainly tries to use nfftmex as a function. What are the first
> > few lines of nfftmex.m ? If it is just the documentation, then the error
> > you are seeing would be consistent with it not finding the mex object
> > file in the path. The mex object file should be in the same directory as
> > the documentation so that the help information is found.
> >
> > http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_prog/f10-60956.html#f10-60987
> >
> > See "Precedence Rules" and "File Precedence" there.
>
>
> I got the reason for one error folder was not in path ! can any one tell me how can i set path in unix server without using GUI
>
> after putting everything in path following is error i am getting when using mex nfftmex.c
>
> mex nfftmex.c
> nfftmex.c:30:26: error: mexversion.c: No such file or directory
> nfftmex.c:43: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
> nfftmex.c:55: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
> nfftmex.c:73: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
> nfftmex.c:96: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
> nfftmex.c:116: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
> nfftmex.c:122: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;int&#8217;
>
> mex: compile of ' "nfftmex.c"' failed.
>
> ??? Error using ==> mex at 221
> Unable to complete successfully.
>
> I have no idea what mexversion.c is
>
> its one of the files used in nfftmex.c following are lines
>
> #include <complex.h>
> #include <string.h>
> #include <stdio.h>
> #include "nfft3.h"
> #include "infft.h"
> #include "nfft3util.h"
> #include "imex.h"
>
> #ifdef HAVE_MEXVERSION_C
> #include "mexversion.c"
> #endif





I commented out the lines having mexverion.c but i am still getting syntax error

>> mex nfftmex.c
nfftmex.c:29: error: expected identifier or &#8216;(&#8217; before &#8216;%&#8217; token
nfftmex.c:29: error: stray &#8216;#&#8217; in program
nfftmex.c:30: error: stray &#8216;#&#8217; in program
nfftmex.c:31: error: stray &#8216;#&#8217; in program
nfftmex.c:43: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
nfftmex.c:55: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
nfftmex.c:73: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
nfftmex.c:96: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
nfftmex.c:116: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;void&#8217;
nfftmex.c:122: error: expected &#8216;=&#8217;, &#8216;,&#8217;, &#8216;;&#8217;, &#8216;asm&#8217; or &#8216;__attribute__&#8217; before &#8216;int&#8217;
nfftmex.c: In function &#8216;cleanup&#8217;:
nfftmex.c:137: error: &#8216;gflags&#8217; undeclared (first use in this function)
nfftmex.c:137: error: (Each undeclared identifier is reported only once
nfftmex.c:137: error: for each function it appears in.)
nfftmex.c: In function &#8216;mexFunction&#8217;:
nfftmex.c:151: error: &#8216;gflags&#8217; undeclared (first use in this function)

mex: compile of ' "nfftmex.c"' failed.

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

This is just a package which i installed and has a matlab interface its not written by me