From octave-maintainers-request at bevo dot che dot wisc dot edu Fri Dec 13 16:21:54 2002 Subject: Re: Creating a standalone executable From: Paul Kienzle To: JD Cole Cc: octave-maintainers at bevo dot che dot wisc dot edu Date: Fri, 13 Dec 2002 17:21:27 -0500 Can you include -lkpathsea on the mkoctfile line? Those libs should be passed directly through to the linker unless there is a bug in mkoctfile. The reason not to include -loctinterp is that liboctave can be used without liboctinterp. On the other hand, it doesn't hurt to specify -loctinterp even if nothing uses it, does it? I didn't realize kpathsea was a separate library. I thought it was statically linked into liboctave. On Fri, Dec 13, 2002 at 02:17:50PM -0800, JD Cole wrote: > Thanks Paul, worked like a charm. (Code included below for those > on-lookers.) As for the compilation steps, should "-lkpathsea > -loctinterp" be default linker arguments to "mkoctfile > --link-stand-alone"? If so I will create a patch. > > -JD > > the code > ======================== > #include > #include // added this include for install_ops definition > > #include > > using namespace std; > > int main(int argc, char *argv[]) > { > install_types (); > > // Important that types are installed before ops > install_ops (); > > octave_value a(10.0),b(20.0),c; > > c = a + b; > > c.print(cout); > > return (0); > } > =================== > > > Paul Kienzle wrote: > > >And you probably want install_types () as well. I'm surprised it gets to > >the operator lookup without it. > > > >- Paul > > > > > >