"Volker (N)" <newsgroups@xxxxxxxx> writes: > We have to port code to gcc 4.2.1 (linux), and most works well, except > instantiation of templates in a dynamic library. I generated a minmal example > to clearify my problem: > > // ********** TemplateTest.H Your test case looks right, and works for me with g++ 4.3.2. > So I compile (here as well, I took away all flags I think are not important > here): > g++ -I. -c TestClass.cpp > g++ -shared -o libTestClass.so TestClass.o > g++ -I. -L. -lTestClass testMain.cpp I note that you say TemplateTest.cpp above, and TestClass.cpp here. Ian