DLL's and templates

Schaible, Joerg Joerg.Schaible@gft.de
Thu May 6 00:13:00 GMT 1999


currently I am trying to link my own first DLL (Mumits samples worked quite
well), but I got unresolved externals for the vtable of all template classes
used within my DLL. Typically following code:

// header.h

class __declspec(dllexport) A
	A() {}
	virtual ~A() {} 

template <class X>
class B : public A
	B() {}
	virtual ~B() {}

// module.cxx

static B b;

Compiling and linking the DLL I will have an unresolved external vor the
vtable of B or for inlined virtual destructors. B is not necessarily

Original error messages:
..\egcs112\rel\gwbase\sh\gwstrsb.o(.text+0x2ba3):gwstrsb.cc: undefined
reference to `GwSingletonClass<GwMemoryCluster>::~GwSingletonClass(void)'
i+0x6b):gwstrwc.cc: undefined reference to `GwTMemoryPool<GwWCStringImp>
virtual table'

Greetings Jörg

Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

More information about the Cygwin mailing list