FU Logo
  • Startseite
  • Kontakt
  • Impressum
  • Home
  • Listenauswahl
  • Anleitungen

[Seqan-dev] Multiple definition problem

<-- thread -->
<-- date -->
  • From: John Reid <j.reid@mail.cryst.bbk.ac.uk>
  • To: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Date: Wed, 06 Feb 2013 22:32:08 +0000
  • Reply-to: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Subject: [Seqan-dev] Multiple definition problem

Hi,

I wonder if the latest svn version is missing some inline definitions.
If I have two translation units:

#include <seqan.h>

int
main( int argc, char * argv [] ) {
    return 0;
}

and

#include <seqan.h>

which I compile and link into an executable I get multiple definition
errors:

gcc.compile.c++
bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_1.o

    "/home/john/src/stlfilt/gfilt"  -ftemplate-depth-128 -Wno-deprecated
-Wno-unused -Wno-error -O3 -finline-functions -Wno-inline -Wall -fPIC
-Wno-deprecated -Wno-unused -DBOOST_FILESYSTEM_VERSION=3
-DBOOST_SYSTEM_DYN_LINK=1 -DMS_HAS_VALGRIND -DMYRRH_DISABLE_ASSERTS
-DNDEBUG -DPVAL_LOOKUP -DSEQAN_ENABLE_DEBUG=0 -DSEQAN_ENABLE_TESTING=0
-DUSING_GOOGLE_PROFILER  -I"." -I"/home/john/Dev/STEME/c++/hmm"
-I"/home/john/Dev/STEME/c++/myrrh" -I"/home/john/Dev/myrrh"
-I"/home/john/src/boost/boost_1_51_0"
-I"/home/john/src/boost/indexing_suite_v2"
-I"/home/john/src/seqan/new-trunk/trunk/core/include"
-I"/home/john/src/seqan/new-trunk/trunk/extras/include"
-I"/usr/local/lib/python2.6/dist-packages/numpy/core/include"
-I"include" -c -o
"bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_1.o"
"sandbox/multiple_defs/translation_unit_1.cpp"

gcc.compile.c++
bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_2.o

    "/home/john/src/stlfilt/gfilt"  -ftemplate-depth-128 -Wno-deprecated
-Wno-unused -Wno-error -O3 -finline-functions -Wno-inline -Wall -fPIC
-Wno-deprecated -Wno-unused -DBOOST_FILESYSTEM_VERSION=3
-DBOOST_SYSTEM_DYN_LINK=1 -DMS_HAS_VALGRIND -DMYRRH_DISABLE_ASSERTS
-DNDEBUG -DPVAL_LOOKUP -DSEQAN_ENABLE_DEBUG=0 -DSEQAN_ENABLE_TESTING=0
-DUSING_GOOGLE_PROFILER  -I"." -I"/home/john/Dev/STEME/c++/hmm"
-I"/home/john/Dev/STEME/c++/myrrh" -I"/home/john/Dev/myrrh"
-I"/home/john/src/boost/boost_1_51_0"
-I"/home/john/src/boost/indexing_suite_v2"
-I"/home/john/src/seqan/new-trunk/trunk/core/include"
-I"/home/john/src/seqan/new-trunk/trunk/extras/include"
-I"/usr/local/lib/python2.6/dist-packages/numpy/core/include"
-I"include" -c -o
"bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_2.o"
"sandbox/multiple_defs/translation_unit_2.cpp"

gcc.link bin/gcc-4.6/release/seqan_multiple_defs

    "/home/john/src/stlfilt/gfilt"  -Wl,-R
-Wl,"/home/john/src/boost/boost_1_51_0/bin.v2/libs/regex/build/gcc-4.6/release"
-Wl,-R
-Wl,"/home/john/src/boost/boost_1_51_0/bin.v2/libs/system/build/gcc-4.6/release"
-Wl,-rpath-link
-Wl,"/home/john/src/boost/boost_1_51_0/bin.v2/libs/regex/build/gcc-4.6/release"
-Wl,-rpath-link
-Wl,"/home/john/src/boost/boost_1_51_0/bin.v2/libs/system/build/gcc-4.6/release"
-o "bin/gcc-4.6/release/seqan_multiple_defs" -Wl,--start-group
"bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_1.o"
"bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_2.o"
"/home/john/src/boost/boost_1_51_0/bin.v2/libs/regex/build/gcc-4.6/release/libboost_regex.so.1.51.0"
"/home/john/src/boost/boost_1_51_0/bin.v2/libs/system/build/gcc-4.6/release/libboost_system.so.1.51.0" 
-Wl,-Bstatic  -Wl,-Bdynamic -lprofiler -lrt -Wl,--end-group 


bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_2.o: In
function `seqan::ManToolDocPrinter_::print(std::basic_ostream<char,
std::char_traits<char> >&, seqan::ToolDoc const&)':
translation_unit_2.cpp:(.text+0x820): multiple definition of
`seqan::ManToolDocPrinter_::print(ostream &, seqan::ToolDoc const &)'
bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_1.o:translation_unit_1.cpp:(.text+0x820):
first defined here
bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_2.o: In
function `seqan::_indent(int)':
translation_unit_2.cpp:(.text+0xcb0): multiple definition of
`seqan::_indent(int)'
bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_1.o:translation_unit_1.cpp:(.text+0xcb0):
first defined here
bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_2.o: In
function `seqan::_writeCLIElement(std::basic_ofstream<char,
std::char_traits<char> >&, int, std::basic_string<char, std::char_trait
    s<char>, std::allocator<char> > const&, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool)':
translation_unit_2.cpp:(.text+0xd20): multiple definition of
`seqan::_writeCLIElement(ofstream &, int, string const &, string const
&, bool)'
bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_1.o:translation_unit_1.cpp:(.text+0xd20):
first defined here
bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_2.o: In
function `seqan::_addUsage(seqan::ToolDoc&, seqan::ArgumentParser const&)':
translation_unit_2.cpp:(.text+0x1020): multiple definition of
`seqan::_addUsage(seqan::ToolDoc &, seqan::ArgumentParser const &)'
bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_1.o:translation_unit_1.cpp:(.text+0x1020):
first defined here
bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_2.o: In
function `seqan::TextToolDocPrinter_::print(std::basic_ostream<char,
std::char_traits<char> >&, seqan::ToolDoc const&)':
translation_unit_2.cpp:(.text+0x1490): multiple definition of
`seqan::TextToolDocPrinter_::print(ostream &, seqan::ToolDoc const &)'
bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_1.o:translation_unit_1.cpp:(.text+0x1490):
first defined here
bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_2.o: In
function `seqan::HtmlToolDocPrinter_::print(std::basic_ostream<char,
std::char_traits<char> >&, seqan::ToolDoc const&)':
translation_unit_2.cpp:(.text+0x1b10): multiple definition of
`seqan::HtmlToolDocPrinter_::print(ostream &, seqan::ToolDoc const &)'
bin/gcc-4.6/release/sandbox/multiple_defs/translation_unit_1.o:translation_unit_1.cpp:(.text+0x1b10):
first defined here
collect2: ld returned 1 exit status
...failed updating 1 target...

I'm using gcc 4.6.3 with seqan trunk revision 13539.

Regards,
John.



<-- thread -->
<-- date -->
  • Follow-Ups:
    • Re: [Seqan-dev] Multiple definition problem
      • From: John Reid <j.reid@mail.cryst.bbk.ac.uk>
  • seqan-dev - February 2013 - Archives indexes sorted by:
    [ thread ] [ subject ] [ author ] [ date ]
  • Complete archive of the seqan-dev mailing list
  • More info on this list...

Hilfe

  • FAQ
  • Dienstbeschreibung
  • ZEDAT Beratung
  • postmaster@lists.fu-berlin.de

Service-Navigation

  • Startseite
  • Listenauswahl

Einrichtung Mailingliste

  • ZEDAT-Portal
  • Mailinglisten Portal