Ok, I have found the answer in another forum. Just for the ones who also stumble across this problem: You have to add the library ld. Well, that means additionaly to -lcppunit you have to specify -ldl.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I have the following Problem when compiling the example Test from the cppunit cookbook.
Invoking: GCC C++ Linker
g++ -lcppunit -otest.cppunit ./Complex.o ./ComplexNumberTest.o ./main.o
/usr/lib/gcc/x86_64-linux-gnu/4.0.2/../../../../lib64/libcppunit.so: undefined reference to `dlclose'
/usr/lib/gcc/x86_64-linux-gnu/4.0.2/../../../../lib64/libcppunit.so: undefined reference to `dlopen'
/usr/lib/gcc/x86_64-linux-gnu/4.0.2/../../../../lib64/libcppunit.so: undefined reference to `dlsym'
I do the following compile command:
g++ -lcppunit -o test.cppunit ComplexNumberTest.o Complex.o main.o
Does anyone know what the problem is? gcc is in version 4.0.2 on an AMD 64 Architecture.
Thanks for your help.
Ok, I have found the answer in another forum. Just for the ones who also stumble across this problem: You have to add the library ld. Well, that means additionaly to -lcppunit you have to specify -ldl.
Just to clarify you are adding the dl library here, not the ld library.