help-octave
[Top][All Lists]
Advanced

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

Re: Location of octave libraries


From: Alexander Hansen
Subject: Re: Location of octave libraries
Date: Sat, 19 Nov 2011 21:02:32 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0

On 11/19/11 7:44 PM, Matyas Sustik wrote:
> Hi All,
> 
> I apologize if this is not the proper forum for this question.
> 
> While writing my Makefiles I have the problem that on different
> machines I have to
> deal with different versions of octave.  (On my laptop I have 2.3.4,
> at school they have
> 2.3.3.)  There does not appear to be a uniform location for the lib
> files.  /usr/lib/octave is not a
> symlink to /usr/lib/octave-3.2.[3|4] on either systems.
> 
> I guess I could call octave --version and parse out and build the
> directory name in the Makefile.  Is that how others tackle this issue?
> 
> I intend to release some code and I would prefer not have to tell the users
> to figure out the location of the libs.  (By the way, Matlab has the
> same issue or even worse, I could not figure out how to get
> automatically the include and lib dirs.)
> 
> Thanks!
> -Matyas

How about parsing the output of "mkoctfile -p OPTION" ?  There are a lot
of OPTIONs as noted under "mkoctfile --help", and it is portable between
different Octave setups.

For example, I get:

$ mkoctfile -p LFLAGS
-L/sw/lib/octave/3.4.3 -L/sw/lib
$ mkoctfile -p INCFLAGS
-I/sw/include/octave-3.4.3/octave/.. -I/sw/include/octave-3.4.3/octave
-I/sw/include

as appropriate to build against installation of Octave-3.4.3 on a Mac
using the Fink package manager, and

$ mkoctfile -p LFLAGS
-L/usr/lib/octave-3.2.4
$ mkoctfile -p INCFLAGS
-I/usr/include/octave-3.2.4 -I/usr/include/octave-3.2.4/octave

for an installation of Octave-3.2.4 under Ubuntu.


reply via email to

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