linker/template problem on alphaev5-dec-osf3.2

Wei Dai weidai@eskimo.com
Sat Jan 10 00:59:00 GMT 1998


I'm trying to compile a C++ program (actually a test driver for the
Crypto++ library) with egcs-1.0.1 on alphaev5-dec-osf3.2 and I'm running
into template problems during linking. If I use -frepo, I get at least 100
undefined symbols like:

MultiplicativeGroup<AbstractRing<PolynomialOver<Field> > >::~MultiplicativeGroup
(void)
MultiplicativeGroup<AbstractRing<PolynomialOver<Field> > > virtual table

If I don't use -frepo, I get a number of errors like this:

gf2n.o: __default_alloc_template<false, 0>::free_list: multiply defined

I guess the third option is to use -fno-implicit-templates and manually
instantiate everything. But the library uses a large number of templates,
so this would be too labor-intensive. Is there something else that can be
done? Is there a bug in egcs or the linker? I tried to compile GNU ld, but
the binutil configuration program tells me it's not available for the OS.

FYI, the library compiles fine with MSVC 5.0 and egcs-1.00 on
i386-cygwin32.



More information about the Gcc mailing list