From help-octave-request at bevo dot che dot wisc dot edu Thu Dec 14 08:14:48 2000 Subject: Re: mkoctfile From: "Andy Adler" To: "Mumit Khan" , "Andy Adler" Cc: "help-octave" Date: Thu, 14 Dec 2000 09:18:02 -0500 On Tuesday, December 12, 2000 11:52 PM, Mumit Khan wrote: > On Tue, 12 Dec 2000, Andy Adler wrote: > > I was thinking about this recently, and I wondered if it > > would be possible to use the approach used in the Perl > > module Win32::API > > http://search.cpan.org/doc/ACALPINI/Win32-API-0.20/API.html > > Two possible ways of building DLL version of Octave runtime: > > 1. One massive DLL -- this is much easier for reasons that > becomes apparent once your undertake this effort. > 2. Keep Octave's current library structure, and then build > individual DLLs. This is tricky, since you now have both > multiple dependent DLLs. What I need, at what I suspect most people are looking for, is a way to use octave with custom *oct extensions under win32. One way to do this is to build them statically into octave. Here is my recipe for doing it. 1. Start with a working foobar.oct from foobar.cc 2. Change the includes in foobar.cc replace #include with #ifdef HAVE_CONFIG_H #include #endif #include "defun-dld.h" #include "error.h" #include "gripes.h" #include "oct-obj.h" #include "utils.h" 3. Put foobar.cc into the source tree at: octave-2.1.31/src/DLD-FUNCTIONS/ 4. Edit the file octave-2.1.31/src/Makefile find the line 'DLD_XSRC := ' and add foobar.cc 5. Recompile make in octave-2.1.31/ I agree that this isn't a solution to the dynamical linking problem, but I thought I'd contribute this for those who would like to get this functionality now. Static builds under win32 are great in the sense that you don't have to provide an install script. I just need to give my coworkers three files: octave.exe, cygwin1.dll, dostuff.m Put these in a directory and execute: octave dostuff.m ____________________________________________ Andy Adler adler at ncf dot ca ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------