Hi,
I have a problem with CppUnit library working on a Compaq Tru64Unix V5.1A OSF1 1885.
We are forced to use Compaq cxx compiler which compiles normally cppunit source code generating both static and shared library files. But when compiling the self testing classes it blocks upon linking with an unresolved external symbols error. I tried to manually pack di object files using the ar tool to obtain the static library. This file works fine with my self testing code except when I use the registry macros. Do you have any idea of what problem could it be ?
Or can you tell me a way to solve the unresolved external symbol problem on cxx linking ?
Thanks
Francesco
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had exactly the same problem. I figured out that the libtool was using ld instead of cxx as the linker. After changing that to cxx, one of the tests still complained about a math function, which i was able to solve by adding -lm to the linker. Both steps can be achieved by adding the following lines to the configure.in file (before AC_PROG_LIBTOOL) :
LD=cxx
LDFLAGS=-lm
and regenerating the configure script with autoconfig. Please bear in mind that this is all based on my limited knowledge of cxx/autoconfig/libtool, but it does seem to do the job for me. I'll post a patch with this info and the new configure script i obtained.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a problem with CppUnit library working on a Compaq Tru64Unix V5.1A OSF1 1885.
We are forced to use Compaq cxx compiler which compiles normally cppunit source code generating both static and shared library files. But when compiling the self testing classes it blocks upon linking with an unresolved external symbols error. I tried to manually pack di object files using the ar tool to obtain the static library. This file works fine with my self testing code except when I use the registry macros. Do you have any idea of what problem could it be ?
Or can you tell me a way to solve the unresolved external symbol problem on cxx linking ?
Thanks
Francesco
I had exactly the same problem. I figured out that the libtool was using ld instead of cxx as the linker. After changing that to cxx, one of the tests still complained about a math function, which i was able to solve by adding -lm to the linker. Both steps can be achieved by adding the following lines to the configure.in file (before AC_PROG_LIBTOOL) :
LD=cxx
LDFLAGS=-lm
and regenerating the configure script with autoconfig. Please bear in mind that this is all based on my limited knowledge of cxx/autoconfig/libtool, but it does seem to do the job for me. I'll post a patch with this info and the new configure script i obtained.