Menu

CppUnit with static libraries only

2001-12-14
2002-01-05
  • Jan Suchotzki

    Jan Suchotzki - 2001-12-14

    Hi,

    I would like to compile CppUnit for a realtime operating system. I can compile it, but the tools doesn't support shared libraries. I think that it must be possible to compile CppUnit only for static libraries.
    Can someone point out howto do this?

    I'm not very common with automake/autoconf. Maybe I can choose it there, but I don't know how.

    regards

    Jan

     
    • David Dennerline

      Since CppUnit is compiled on non-WIN32 platforms with autoconf/automake, it should have made both static and dynamic versions. In my /usr/local/lib there are:

      /usr/local/lib/libcppunit-1.5.so.5
      /usr/local/lib/libcppunit-1.5.so.5.0.0
      /usr/local/lib/libcppunit-1.6.so.0
      /usr/local/lib/libcppunit-1.6.so.0.0.2
      /usr/local/lib/libcppunit.a
      /usr/local/lib/libcppunit.la
      /usr/local/lib/libcppunit.so

      The libcppunit.a is the static version. You might want to do a man on libtool for your "target" system. libtool does have a -static option for creating static only libraries. There are two methods that might be appropriate:

      1) ./configure --disable-shared or ./configure --enable-static

      2) Modify the Makefile.am an add: LDFLAGS=-static

      3) ./configure --target=i86-freebsd --host=i86-linux. If your hosted and target systems are not the same. Cross-compilation requires extra effort with autoconf/automake, but is much easier to accomplish than using any other build system. I suggest you purchase the book, GNU AUTOCONF, AUTOMAKE, and LIBTOOL, by Gary V. Vaughan, New Riders (http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=1578701902&vm=)

       
    • Jan Suchotzki

      Jan Suchotzki - 2002-01-05

      Hi and thanks!

      It works very good!

      Jan

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.