public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Fwd: Linking public: static const members in lib*.a's
@ 2004-09-10  7:29 Steven T. Hatton
  2004-09-10  9:21 ` Florian Weimer
  0 siblings, 1 reply; 5+ messages in thread
From: Steven T. Hatton @ 2004-09-10  7:29 UTC (permalink / raw)
  To: gcc

I've posted the following to a few different newsgroups and mailing lists.  
The best explanation I've seen so far is that I'm asking the linker to 
evaluate the static initialization in an external library, and it doesn't 
know how to do that.  I believe the code is valid C++, and I believe I am 
using the language as it was intended to be used.  What exactly is the 
problem with what I'm trying to do in the following?

 Sorry about the big code dump.  I tried to get it down to the minimum
 required to demonstrate the problem.  On the following I run 
 aclocal
 autoheader
 autoconf
 automake -a -c --gnits
 ./configure
 make
 
 with the results shown at the end of the code listing.  The problem seems to
 be related to my using static const class members.  Other similarly
 configured programs work OK.  Can someone tell me what I'm doing wrong
 here?
 
 ./configure.ac
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
 AC_INIT(testlibs, 0.1, hattons@here.com)
 AC_CONFIG_SRCDIR([main.cpp])
 AC_CONFIG_HEADER([config.h])
 
 AM_INIT_AUTOMAKE
 # Checks for programs.
 AC_PROG_CXX
 AC_PROG_CC
 
 # Checks for libraries.
 AC_PROG_RANLIB
 # Checks for header files.
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 AC_C_INLINE
 
 # Checks for library functions.
 
 AC_CONFIG_FILES([Makefile
                  sth/Makefile
                  sth/util/Makefile])
 AC_OUTPUT
 
 
 
 ./Makefile.am
 INCLUDES = -I$(top_srcdir)/sth $(all_includes)
 bin_PROGRAMS = testlibs
 testlibs_SOURCES = main.cpp
 testlibs_LDFLAGS = $(all_libraries)
 testlibs_LDADD = $(top_builddir)/sth/libsth.a 
 SUBDIRS = sth
 
 
 
 ./main.cpp
 #include "ColorTest.h"
 #include <iostream>
 
 int main(int argc, char* argv[]) {
   using sth::ColorTest;
   ColorTest* ct = new ColorTest(std::cout);
 }
 
 ./sth/Makefile.am
 INCLUDES = -I$(top_srcdir)/sth/util $(all_includes)
 SUBDIRS = util
 lib_LIBRARIES = libsth.a
 libsth_a_LIBADD = $(top_builddir)/sth/util/libutil.a
 noinst_HEADERS = ColorTest.h
 libsth_a_SOURCES = ColorTest.cpp
 
 
 ./sth/ColorTest.h
 #ifndef STHCOLORTEST_H
 #define STHCOLORTEST_H
 
 #include <ostream>
 namespace sth {
   class ColorTest {
   public:
     ColorTest(std::ostream& out);
     ~ColorTest();
   };
 };
 
 #endif
 
 
 ./sth/ColorTest.cpp
 #include "ColorTest.h"
 #include <iostream>
 
 int main(int argc, char* argv[]) {
   using sth::ColorTest;
   ColorTest* ct = new ColorTest(std::cout);
 }
 
 ./sth/util/Makefile.am
 INCLUDES = -I$(all_includes)
 lib_LIBRARIES = libutil.a
 noinst_HEADERS = RgbColor.h Printable_IF.h
 libutil_a_SOURCES = RgbColor.cpp
 
 
 ./sth/util/RgbColor.h
 #ifndef UTILRGBCOLOR_H
 #define UTILRGBCOLOR_H
 
 #include "Printable_IF.h"
 namespace sth
   {
   namespace util
     {
 
     /**
     @author Steven T. Hatton
     */
 
     class RgbColor
           : public Printable_IF
       {
       public:
         RgbColor(const unsigned char& r=255,
                  const unsigned char& g=127,
                  const unsigned char& b=127);
           
         unsigned char R() const;
         void R(const unsigned char& r);
 
         unsigned char G() const;
         void G(const unsigned char& g);
 
         unsigned char B() const;
         void B(const unsigned char& b);
 
         std::ostream& print(std::ostream& out) const;
 
         static const RgbColor RED;
         static const RgbColor GREEN;
         static const RgbColor BLUE;
         static const RgbColor BLACK;
         static const RgbColor WHITE;
         static const RgbColor MAGENTA;
         static const RgbColor CYAN;
         static const RgbColor YELLOW;
       private:
         unsigned char m_r;
         unsigned char m_g;
         unsigned char m_b;
       };
 
     inline unsigned char RgbColor::R() const
       {
         return m_r;
       }
     inline void RgbColor::R(const unsigned char& r)
     {
       m_r = r;
     }
 
     inline unsigned char RgbColor::G() const
       {
         return m_g;
       }
 
     inline void RgbColor::G(const unsigned char& g)
     {
       m_g = g;
     }
 
     inline unsigned char RgbColor::B() const
       {
         return m_b;
       }
 
     inline void RgbColor::B(const unsigned char& b)
     {
       m_b = b;
     }
   }
 }
 #endif
 
 ./sth/util/RgbColor.h
 #include "RgbColor.h"
 namespace sth
 {
   util::RgbColor::RgbColor(const unsigned char& r,
       const unsigned char& g,
       const unsigned char& b)
     : m_r(r)
     , m_g(g)
     , m_b(b)
   {}
   
   const util::RgbColor util::RgbColor::RED     = util::RgbColor(255,0,0);
   const util::RgbColor util::RgbColor::GREEN   = util::RgbColor(0,255,0);
   const util::RgbColor util::RgbColor::BLUE    = util::RgbColor(0,0,255);
   const util::RgbColor util::RgbColor::BLACK   = util::RgbColor(0,0,0);
   const util::RgbColor util::RgbColor::WHITE   =
 util::RgbColor(255,255,255);
   const util::RgbColor util::RgbColor::MAGENTA = util::RgbColor(255,0,255);
   const util::RgbColor util::RgbColor::CYAN    = util::RgbColor(0,255,255);
   const util::RgbColor util::RgbColor::YELLOW  = util::RgbColor(255,255,0);
 
   /*!
     \fn util::RgbColor::print(std::ostream& out) const
   */
   std::ostream& util::RgbColor::print(std::ostream& out) const
   {
     out
       << "util::RgbColor::{r=" << this->m_r
       << ",g=" << this->m_g
       << ",b=" << this->m_b << "}\n";
     return out;
   }
   
 }
 
 ./sth/util/Printable_IF.h
 #ifndef PRINTABLE_IF_H
 #define PRINTABLE_IF_H
 #include <iostream>
 namespace sth
   {
   namespace util
     {
     class Printable_IF
       {
       public:
         Printable_IF()
         {}
         virtual ~Printable_IF()
         {}
 
         virtual std::ostream& print(std::ostream& out) const = 0;
       };
 
     inline std::ostream& operator<<(std::ostream& out, const Printable_IF&
 pif)
     {
       return pif.print(out);
     }
   }
 }
 #endif
 
 undefined reference to `sth::util::RgbColor::RED'
 ./sth/libsth.a(ColorTest.o)(.text+0x6f):./sth/ColorTest.cpp:9: undefined
 reference to `sth::util::RgbColor::RED'
 ./sth/libsth.a(ColorTest.o)(.text+0x77):./sth/ColorTest.cpp:9: undefined
 reference to `sth::util::RgbColor::RED'
 ./sth/libsth.a(ColorTest.o)(.text+0x81):./sth/ColorTest.cpp:9: undefined
 reference to `vtable for sth::util::RgbColor'
 ./sth/libsth.a(ColorTest.o)(.text+0x8f): In function
 `sth::ColorTest::ColorTest[in-charge](std::basic_ostream<char,
 std::char_traits<char> >&)':

-- 
Regards,
Steven

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: Linking public: static const members in lib*.a's
  2004-09-10  7:29 Fwd: Linking public: static const members in lib*.a's Steven T. Hatton
@ 2004-09-10  9:21 ` Florian Weimer
  2004-09-10 10:40   ` Steven T. Hatton
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Weimer @ 2004-09-10  9:21 UTC (permalink / raw)
  To: Steven T. Hatton; +Cc: gcc

* Steven T. Hatton:

>  Sorry about the big code dump.  I tried to get it down to the minimum
>  required to demonstrate the problem.

It's still not minimal (you should be able to reproduce it with two
preprocessed translation units), and the file names you indicated
appear to be wrong.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: Linking public: static const members in lib*.a's
  2004-09-10  9:21 ` Florian Weimer
@ 2004-09-10 10:40   ` Steven T. Hatton
  2004-09-10 11:39     ` Steven T. Hatton
  0 siblings, 1 reply; 5+ messages in thread
From: Steven T. Hatton @ 2004-09-10 10:40 UTC (permalink / raw)
  To: gcc

On Friday 10 September 2004 04:44, Florian Weimer wrote:
> * Steven T. Hatton:
> >  Sorry about the big code dump.  I tried to get it down to the minimum
> >  required to demonstrate the problem.
>
> It's still not minimal (you should be able to reproduce it with two
> preprocessed translation units), and the file names you indicated
> appear to be wrong.

These filenames should all be correct.  I guess I intuitively knew that trying 
to reproduce the problem with only two translation units would fail.  It 
seems the problem has to do with secondary linkage.  I'm going to take the 
following and move ColorTest.* to src/sth and src/sth/[PR]* to util, and try 
again, just to be sure.

##################
# ./src/sth/Makefile.am
##################
INCLUDES = $(all_includes)
lib_LIBRARIES = libsth.a
libsth_a_SOURCES = RgbColor.cpp
noinst_HEADERS = RgbColor.h Printable_IF.h

################## EOF ##################


##################
# ./src/Makefile.am
##################
INCLUDES = -I$(top_srcdir)/src/sth $(all_includes)
bin_PROGRAMS = testlibs
testlibs_SOURCES = main.cpp ColorTest.cpp
testlibs_LDFLAGS = $(all_libraries)
testlibs_LDADD = $(top_builddir)/src/sth/libsth.a
SUBDIRS = sth
################## EOF ##################


##################
# ./Makefile.am
##################
SUBDIRS = src
################## EOF ##################


##################
# ./configure.ac
##################
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(FULL-PACKAGE-NAME, 0.1, bugs@insects.ant)
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC

# Checks for libraries.
AC_PROG_RANLIB
# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE

# Checks for library functions.

AC_CONFIG_FILES([Makefile
                 src/Makefile
                 src/sth/Makefile])
AC_OUTPUT
################## EOF ##################


/******************
 * ./src/sth/Printable_IF.h
 ******************/

#ifndef PRINTABLE_IF_H
#define PRINTABLE_IF_H
#include <iostream>
namespace sth
  {
  namespace util
    {
    class Printable_IF
      {
      public:
        Printable_IF()
        {}
        virtual ~Printable_IF()
        {}

        virtual std::ostream& print(std::ostream& out) const = 0;
      };

    inline std::ostream& operator<<(std::ostream& out, const Printable_IF& 
pif)
    {
      return pif.print(out);
    }
  }
}
#endif
/****************** EOF ******************/


/******************
 * ./src/sth/RgbColor.h
 ******************/
#ifndef UTILRGBCOLOR_H
#define UTILRGBCOLOR_H

#include "Printable_IF.h"
namespace sth
{
  namespace util
  {

    /**
       @author Steven T. Hatton
    */

    class RgbColor
      : public Printable_IF
    {
      unsigned char m_r;
      unsigned char m_g;
      unsigned char m_b;
 
    public:
      RgbColor(const unsigned char& r=255,
        const unsigned char& g=127,
        const unsigned char& b=127);
          
      unsigned char R() const;
      void R(const unsigned char& r);

      unsigned char G() const;
      void G(const unsigned char& g);

      unsigned char B() const;
      void B(const unsigned char& b);

      std::ostream& print(std::ostream& out) const;

      static const RgbColor RED;

    };
      
    inline unsigned char RgbColor::R() const
    {
      return m_r;
    }
      
    inline void RgbColor::R(const unsigned char& r)
    {
      m_r = r;
    }
      
    inline unsigned char RgbColor::G() const
    {
      return m_g;
    }
      
    inline void RgbColor::G(const unsigned char& g)
    {
      m_g = g;
    }
      
    inline unsigned char RgbColor::B() const
    {
      return m_b;
    }
      
    inline void RgbColor::B(const unsigned char& b)
    {
      m_b = b;
    }
  }
}
#endif
/****************** EOF ******************/


/******************
 * ./src/ColorTest.h
 ******************/
#ifndef STHCOLORTEST_H
#define STHCOLORTEST_H

#include <ostream>
namespace sth {

  class ColorTest {
  public:
    ColorTest(std::ostream& out);
    ~ColorTest();
  };
};

#endif
/****************** EOF ******************/


/******************
 * ./src/sth/RgbColor.cpp
 ******************/
#include "RgbColor.h"
namespace sth
{
  util::RgbColor::RgbColor(const unsigned char& r,
      const unsigned char& g,
      const unsigned char& b)
    : m_r(r)
    , m_g(g)
    , m_b(b)
  {}
  
  const util::RgbColor util::RgbColor::RED     = util::RgbColor(255,0,0);

  std::ostream& util::RgbColor::print(std::ostream& out) const
  {
    out
      << "util::RgbColor::{r=" << int(this->m_r)
      << ",g=" << int(this->m_g)
      << ",b=" << int(this->m_b) << "}\n";
    return out;
  }
  
}
/****************** EOF ******************/


/******************
 * ./src/main.cpp
 ******************/
#include "ColorTest.h"
#include <iostream>

int main(int argc, char* argv[]) {
  using sth::ColorTest;
  ColorTest* ct = new ColorTest(std::cout);
}

/****************** EOF ******************/


/******************
 * ./src/ColorTest.cpp
 ******************/
#include "ColorTest.h"
#include "RgbColor.h"
#include <ostream>

namespace sth
{
  ColorTest::ColorTest(std::ostream& out)
  {
    util::RgbColor sur(util::RgbColor::RED);
    out << sur;
  }
  ColorTest::~ColorTest()
  {}
};
/****************** EOF ******************/



-- 
Regards,
Steven

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: Linking public: static const members in lib*.a's
  2004-09-10 10:40   ` Steven T. Hatton
@ 2004-09-10 11:39     ` Steven T. Hatton
  2004-09-10 18:12       ` Steven T. Hatton
  0 siblings, 1 reply; 5+ messages in thread
From: Steven T. Hatton @ 2004-09-10 11:39 UTC (permalink / raw)
  To: gcc

On Friday 10 September 2004 06:16, Steven T. Hatton wrote:
> On Friday 10 September 2004 04:44, Florian Weimer wrote:
> > * Steven T. Hatton:
> > >  Sorry about the big code dump.  I tried to get it down to the minimum
> > >  required to demonstrate the problem.
> >
> > It's still not minimal (you should be able to reproduce it with two
> > preprocessed translation units), and the file names you indicated
> > appear to be wrong.
>
> These filenames should all be correct.  I guess I intuitively knew that
> trying to reproduce the problem with only two translation units would fail.
>  It seems the problem has to do with secondary linkage.  I'm going to take
> the following and move ColorTest.* to src/sth and src/sth/[PR]* to util,
> and try again, just to be sure.
[...]
> };
> /****************** EOF ******************/

As expected, this version failed.  Is there something I need to do with the 
dynamic linker in order to link the libutil.a into the libsth.a?

##################
# ./src/sth/util/Makefile.am
##################
INCLUDES = $(all_includes)
lib_LIBRARIES = libutil.a
libutil_a_SOURCES = RgbColor.cpp
noinst_HEADERS = RgbColor.h Printable_IF.h

################## EOF ##################


##################
# ./src/sth/Makefile.am
##################
INCLUDES = -I$(top_srcdir)/src/sth/util $(all_includes)
lib_LIBRARIES = libsth.a
libsth_a_SOURCES = ColorTest.cpp
libsth_a_LIBADD = util/libutil.a
noinst_HEADERS = ColorTest.h
SUBDIRS = util

################## EOF ##################


##################
# ./src/Makefile.am
##################
INCLUDES = -I$(top_srcdir)/src/sth $(all_includes)
bin_PROGRAMS = testlibs
testlibs_SOURCES = main.cpp
testlibs_LDADD = sth/libsth.a
SUBDIRS = sth
################## EOF ##################


##################
# ./Makefile.am
##################
SUBDIRS = src
################## EOF ##################


##################
# ./configure.ac
##################
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(FULL-PACKAGE-NAME, 0.1, bugs@insects.ant)
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC

# Checks for libraries.
AC_PROG_RANLIB
# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE

# Checks for library functions.

AC_CONFIG_FILES([Makefile
                 src/Makefile
                 src/sth/Makefile
   src/sth/util/Makefile])
AC_OUTPUT
################## EOF ##################


/******************
 * ./src/sth/util/Printable_IF.h
 ******************/

#ifndef PRINTABLE_IF_H
#define PRINTABLE_IF_H
#include <iostream>
namespace sth
  {
  namespace util
    {
    class Printable_IF
      {
      public:
        Printable_IF()
        {}
        virtual ~Printable_IF()
        {}

        virtual std::ostream& print(std::ostream& out) const = 0;
      };

    inline std::ostream& operator<<(std::ostream& out, const Printable_IF& 
pif)
    {
      return pif.print(out);
    }
  }
}
#endif
/****************** EOF ******************/


/******************
 * ./src/sth/util/RgbColor.h
 ******************/
#ifndef UTILRGBCOLOR_H
#define UTILRGBCOLOR_H

#include "Printable_IF.h"
namespace sth
{
  namespace util
  {

    /**
       @author Steven T. Hatton
    */

    class RgbColor
      : public Printable_IF
    {
      unsigned char m_r;
      unsigned char m_g;
      unsigned char m_b;
 
    public:
      RgbColor(const unsigned char& r=255,
        const unsigned char& g=127,
        const unsigned char& b=127);
          
      unsigned char R() const;
      void R(const unsigned char& r);

      unsigned char G() const;
      void G(const unsigned char& g);

      unsigned char B() const;
      void B(const unsigned char& b);

      std::ostream& print(std::ostream& out) const;

      static const RgbColor RED;

    };
      
    inline unsigned char RgbColor::R() const
    {
      return m_r;
    }
      
    inline void RgbColor::R(const unsigned char& r)
    {
      m_r = r;
    }
      
    inline unsigned char RgbColor::G() const
    {
      return m_g;
    }
      
    inline void RgbColor::G(const unsigned char& g)
    {
      m_g = g;
    }
      
    inline unsigned char RgbColor::B() const
    {
      return m_b;
    }
      
    inline void RgbColor::B(const unsigned char& b)
    {
      m_b = b;
    }
  }
}
#endif
/****************** EOF ******************/


/******************
 * ./src/sth/ColorTest.h
 ******************/
#ifndef STHCOLORTEST_H
#define STHCOLORTEST_H

#include <ostream>
namespace sth {

  class ColorTest {
  public:
    ColorTest(std::ostream& out);
    ~ColorTest();
  };
};

#endif
/****************** EOF ******************/


/******************
 * ./src/sth/util/RgbColor.cpp
 ******************/
#include "RgbColor.h"
namespace sth
{
  util::RgbColor::RgbColor(const unsigned char& r,
      const unsigned char& g,
      const unsigned char& b)
    : m_r(r)
    , m_g(g)
    , m_b(b)
  {}
  
  const util::RgbColor util::RgbColor::RED     = util::RgbColor(255,0,0);

  std::ostream& util::RgbColor::print(std::ostream& out) const
  {
    out
      << "util::RgbColor::{r=" << int(this->m_r)
      << ",g=" << int(this->m_g)
      << ",b=" << int(this->m_b) << "}\n";
    return out;
  }
  
}
/****************** EOF ******************/


/******************
 * ./src/sth/ColorTest.cpp
 ******************/
#include "ColorTest.h"
#include "RgbColor.h"
#include <ostream>

namespace sth
{
  ColorTest::ColorTest(std::ostream& out)
  {
    util::RgbColor sur(util::RgbColor::RED);
    out << sur;
  }
  ColorTest::~ColorTest()
  {}
};
/****************** EOF ******************/


/******************
 * ./src/main.cpp
 ******************/
#include "ColorTest.h"
#include <iostream>

int main(int argc, char* argv[]) {
  using sth::ColorTest;
  ColorTest* ct = new ColorTest(std::cout);
}

/****************** EOF ******************/



-- 
Regards,
Steven

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fwd: Linking public: static const members in lib*.a's
  2004-09-10 11:39     ` Steven T. Hatton
@ 2004-09-10 18:12       ` Steven T. Hatton
  0 siblings, 0 replies; 5+ messages in thread
From: Steven T. Hatton @ 2004-09-10 18:12 UTC (permalink / raw)
  To: gcc

On Friday 10 September 2004 06:39, Steven T. Hatton wrote:

It was suggested that I run nm -C on my libraries.  That revealed that 
sth::util::RgbColor::RED was undefined in the ColorTest.o. I added the 
library containing RgbColor.o with -l and its path with -L.  That enabled the 
linker to find what it needed.  

I guess this means that a lib*.a isn't "cumulative" in that it only references 
names in the libraries linked into it. Where can I learn more about what 
things such as this stuff from the nm man page?

           "A" The symbol's value is absolute, and  will  not  be
               changed by further linking.

           "B" The  symbol  is  in the uninitialized data section
               (known as BSS).

           "C" The symbol is common.  Common symbols  are  unini­
               tialized data.  When linking, multiple common sym­
               bols may appear with the same name.  If the symbol
               is   defined  anywhere,  the  common  symbols  are
               treated as undefined references.

This is the nm stuff that gave me the clue I needed.

RgbColor.o:
000001d4 t global constructors keyed to _ZN3sth4util8RgbColorC2ERKhS3_S3_
0000011a t __static_initialization_and_destruction_0(int, int)
00000000 W sth::util::Printable_IF::Printable_IF()
00000000 W sth::util::Printable_IF::~Printable_IF()
00000000 W sth::util::Printable_IF::~Printable_IF()
00000000 W sth::util::Printable_IF::~Printable_IF()
00000000 B sth::util::RgbColor::RED
00000040 T sth::util::RgbColor::RgbColor(unsigned char const&, unsigned char 
const&, unsigned char const&)
00000000 T sth::util::RgbColor::RgbColor(unsigned char const&, unsigned char 
const&, unsigned char const&)
00000000 W sth::util::RgbColor::~RgbColor()
00000000 W sth::util::RgbColor::~RgbColor()
00000080 T sth::util::RgbColor::print(std::basic_ostream<char, 
std::char_traits<char> >&) const
         U std::basic_ostream<char, std::char_traits<char> >::operator<<(int)
00000000 V std::basic_streambuf<char, std::char_traits<char> >::_S_pback_size
00000000 V std::basic_streambuf<wchar_t, std::char_traits<wchar_t> 
>::_S_pback_size
         U std::ios_base::Init::Init()
         U std::ios_base::Init::~Init()
00000008 b std::__ioinit
         U std::basic_ostream<char, std::char_traits<char> >& std::operator<< 
<std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, 
char const*)
00000000 V typeinfo for sth::util::Printable_IF
00000000 V typeinfo for sth::util::RgbColor
00000000 V typeinfo name for sth::util::Printable_IF
00000000 V typeinfo name for sth::util::RgbColor
         U vtable for __cxxabiv1::__class_type_info
         U vtable for __cxxabiv1::__si_class_type_info
00000000 V vtable for sth::util::Printable_IF
00000000 V vtable for sth::util::RgbColor
         U operator delete(void*)
         U __cxa_atexit
         U __cxa_pure_virtual
         U __dso_handle
         U __gxx_personality_v0
000001a4 t __tcf_0
000001bc t __tcf_1


ColorTest.o:
0000012e t global constructors keyed to _ZN3sth9ColorTestC2ERSo
         U _Unwind_Resume
000000d8 t __static_initialization_and_destruction_0(int, int)
00000000 W sth::util::Printable_IF::Printable_IF(sth::util::Printable_IF 
const&)
00000000 W sth::util::Printable_IF::~Printable_IF()
00000000 W sth::util::Printable_IF::~Printable_IF()
00000000 W sth::util::Printable_IF::~Printable_IF()
         U sth::util::RgbColor::RED
00000000 W sth::util::RgbColor::RgbColor(sth::util::RgbColor const&)
00000000 W sth::util::RgbColor::~RgbColor()
00000000 W sth::util::operator<<(std::basic_ostream<char, 
std::char_traits<char> >&, sth::util::Printable_IF const&)
00000066 T sth::ColorTest::ColorTest(std::basic_ostream<char, 
std::char_traits<char> >&)
00000000 T sth::ColorTest::ColorTest(std::basic_ostream<char, 
std::char_traits<char> >&)
000000d2 T sth::ColorTest::~ColorTest()
000000cc T sth::ColorTest::~ColorTest()
00000000 V std::basic_streambuf<char, std::char_traits<char> >::_S_pback_size
00000000 V std::basic_streambuf<wchar_t, std::char_traits<wchar_t> 
>::_S_pback_size
         U std::ios_base::Init::Init()
         U std::ios_base::Init::~Init()
00000000 b std::__ioinit
00000000 V typeinfo for sth::util::Printable_IF
00000000 V typeinfo name for sth::util::Printable_IF
         U vtable for __cxxabiv1::__class_type_info
00000000 V vtable for sth::util::Printable_IF
         U vtable for sth::util::RgbColor
         U operator delete(void*)
         U __cxa_atexit
         U __cxa_pure_virtual
         U __dso_handle
         U __gxx_personality_v0
00000116 t __tcf_0

-- 
Regards,
Steven

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-09-10 17:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-10  7:29 Fwd: Linking public: static const members in lib*.a's Steven T. Hatton
2004-09-10  9:21 ` Florian Weimer
2004-09-10 10:40   ` Steven T. Hatton
2004-09-10 11:39     ` Steven T. Hatton
2004-09-10 18:12       ` Steven T. Hatton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).