Can't link cookbook ex on Solaris 8 w/Forte

  • Phillip Heerdt-Wingfield

    I am using CppUnit 1.8.0 on Sun Solaris 8 w/ Forte 6 Update 2. I patched the sources with the Patch for the Forte 6 Update2 so that I could build the distribution. I built the distribution and the check target. The cppunittestmain in the examples/ directory built with no errors and executed successfully.
    My problem is that I can't successfully link the library into even the cookbook Complex example without undefined symbol errors in TestRegistryFactory.
    I used the same flags that were used to build the distribution; -mt -pta -instances=static xildoff but that didn't work. I tried using the same link line as for cppunittestmain in examples/Makefile with all flags in exactly the same order. I tried building with both the static libcppunit.a and I get less undefined symbols with the static library than with the dynamic. There have been some other posts related to this problem but the only resolution was to use the above flags.
    Does anyone have an example make file that works?

    • Public Name

      Public Name - 2002-12-15

      The Solaris compiler deserves to be PTD.

      First of all, get the latest linker(!) and compiler patches. Esp. linker patches seem to come up every few month, and if you check the patch descriptions it is surprising that the linker can build anything at all. Clean up the template cache. Recompile everything (check also the comments for the patch regarding the mixup of using the -xar flag).

      Investigate the resulting libraries for the missing symbols. Check (a) if the corresponding source was compiled at all, (b) included in the library building (curse autoconf here), and (c) if the template cache with the corresponding template .o modules has also been included into the library.

    • Anonymous - 2003-01-02

      I am using cppunit-1.9.8 on solaris 8 with Forte C++ compiler 6 update 2 .
      I am getting the following error when I am trying to compile Examples. Can some body help me out!!


      Making all in simple
      make[1]: Entering directory `/tmp_mnt/net/legato-2/u4/users/schitti/projects/cppunit-1.9.8/examples/simple'
      source='ExampleTestCase.cpp' object='ExampleTestCase.o' libtool=no \ depfile='.deps/ExampleTestCase.Po' tmpdepfile='.deps/ExampleTestCase.TPo' \ depmode=none /bin/sh ../../config/depcomp \ CC -G -DHAVE_CONFIG_H -I. -I. -I../../config -I../../include -I../../include    -g -c -o ExampleTestCase.o `test -f ExampleTestCase.cpp || echo './'`ExampleTestCase.cpp
      "ExampleTestCase.h", line 16: Error: ExampleTestCase::ThisTestFixtureType is not accessible from ExampleTestCase::ThisTestFixtureFactory.
      "ExampleTestCase.h", line 16: Error: ExampleTestCase::ThisTestFixtureType is not accessible from ExampleTestCase::ThisTestFixtureFactory::makeFixture() const.
      2 Error(s) detected.
      make[1]: *** [ExampleTestCase.o] Error 2
      make[1]: Leaving directory `/tmp_mnt/net/legato-2/u4/users/schitti/projects/cppunit-1.9.8/examples/simple'
      make: *** [all-recursive] Error 1


Log in to post a comment.