help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to combine several functions in a single oct-file? (2)


From: Lukas Reichlin
Subject: Re: How to combine several functions in a single oct-file? (2)
Date: Mon, 13 Feb 2012 13:20:31 +0100

On 13.02.2012, at 11:56, Carlo de Falco wrote:

> 2012/2/13 Lukas Reichlin <address@hidden>:
>> Thank you very much for your explanations, Michael. I think I'll discuss the 
>> options with one of my mentoring profs, as I am a neophyte when it comes to 
>> makefiles. What I already know: For the sake of user friendliness, I want to 
>> keep the control package self-containing, i.e. installation by "pkg install 
>> -forge control" without external libraries.
>> 
>> If I create a static library (like slicotlibrary.a), will the oct-file 
>> include the entire static library or just those parts which are needed? Is 
>> this related to the "code stripping" option?
> 
> stripping is not reccomended on some platforms (e.g. OS X) so I would
> avoid it, disk space is not a hard constraint nowadays anyway.
> 
> Also please note that creating a library (either static or shared)
> does not solve your original problem of reducing the number of
> separate .oct files in the package
> as the interfaces will still need to be written as separate .cc files
> or grouped together and then "autoloaded".
> 
> What I would suggest is to create just one .oct files with all your
> DEFUN_DLD's linked statically to the SLICOT library and use autoload
> to tell Octave
> where to find the function definitions

Thanks, Carlo. I think I do the following:
1. Include slicot.tar.gz [1] (as an archive) in my package. Adapt the package 
makefile such that it compiles all the Fortran code inside the archive and that 
it creates a static library (slicotlibrary.a) out of it. Then I include that 
library in my various oct-files.

If I succeed with 1:
2. Combine all my DEFUN_DLD in one oct-file, link slicotlibrary.a statically 
and use autoload as you proposed.

One last question: Does mkoctfile create the PKG_ADD file automatically if 
needed? Or do I have to create it manually?

> 
>> Best regards,
>> Lukas
> 
> x.

Best Regards,
Lukas

[1] SLICOT Library
http://www.slicot.org/shared/slicot.tar.gz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]