After compiling the following code fragment into a .so file
using GNU g++ 3.2.3 I get an "unresolved reference" error
message when that .so file is loaded. I do not get this error
with earlier versions (e.g., 2.9.x) of the GNU g++ compiler.
Assume Name, DiscreteProposition, ContinuousProposition,
constructors, destructors, comparitors, n, and ctp have been
properly defined and initialized.
template<class FrameType = DiscreteProposition>
class Frame
{
public:
}
map<Name, Frame<ContinuousProposition>, less<Name> > ContinuousFrameMapping;
ContinuousProposition ctp;
Name n;
Frame<ContinuousProposition> Fx (n, ctp);
Name tag = "abc";
ContinuousFrameMapping[tag] = Fx;
The above code is compiled into a <file name>.so file that is part of C++
and JNI code to interface Java with native C++ code.
While Java is loading the <file name>.so file at runtime, the following error message
is displayed.
Exception in thread "main" java.lang.UnsatisfiedLinkError: <file name>.so
<file name>.so: undefined symbol: _ZN5FrameI21ContinuousPropositionEaSERKS1_
.......
The unresolved link error error seems to be related to a constructor/destructor that
is needed as a result of the ContinuousFrameMapping[tag] = Fx; statement.
However, I cannot figure out what needs to be defined to fix this error.
Any suggestions?
Thanks,
--Len
_______________________________________________ Help-gplusplus mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gplusplus
