[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Shared libs on OS X
From: |
Per Persson |
Subject: |
Shared libs on OS X |
Date: |
Sun, 17 Nov 2002 23:03:37 +0100 |
Hi,
I trying to resolve the lingering issues with shared and dynamic
loading on OS X. Right now I'm just using brute force to get something
to link...
Anyway, almost all of the problems concerns global symbols, almost all
of which are due to static variables in template functions. The
workaround is to promote the variable to a private member of the class.
I'm currently wrestling with the final change needed to get liboctave
working (as a shared lib) but I'm lost in the C++ jungle. How could I
get a private 'static MDiagArray2<T> foo' instance for each of the
MDiagArray2<T> instantiations? I'm not asking that this code should be
part of octave (yet;-)), but I sure would like to get it running to
have something to work from.
Anyone?
/Per
Code in question (MDiagArray2.cc):
------
template <class T>
MDiagArray2<T>&
operator -= (MDiagArray2<T>& a, const MDiagArray2<T>& b)
{
...
if (r != b_nr || c != b_nc)
{
gripe_nonconformant ("operator -=", r, c, b_nr, b_nc);
// static MDiagArray2<T> foo; /* Need to replace with private
member of class */
return foo;
}
...
return a;
}
------------
Per Persson
Blekinge Institute of Technology
Dept. of Signal Processing and Telecommunications
www: http://www.its.bth.se/staff/pee
e-mail: address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Shared libs on OS X,
Per Persson <=