This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
multiple definitions, shared library
- From: "Roland Leitner" <roland-leitner at chello dot at>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Fri, 12 May 2006 09:39:40 -0700
- Subject: multiple definitions, shared library
Hi,
i am using cygwin/g++ to make first steps to build C++ code developed
with MSVC 6.0. Later i want to use it on Linux.
The project consists of several sharded libraries. I succeeded in
building the first one (ASIBasics). The second one (ASIXML) uses
ASIBasics. The linker complaines about multiple definitions.
A class DRLException :: std::exception has inline constructor and a few
inline methods. DRLException.h is included in several places as well in
ASIBasics and in ASIXML. Compiler complains about multiple definitions
of DRLException::DRLException() and DRLException::~DRLException() and
about multiple definition of 'typeinfo name for DRLException' and
'typeinfo for DRLException'.
I don't understand this because linking the first library works fine,
but linking against it leads to these errors.
Any ideas?
Thx,
Roland