public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "maarten dot keijzer at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/24389] New: tr1::unordered_map duplicate symbols (not extern?) Date: Sat, 15 Oct 2005 20:08:00 -0000 [thread overview] Message-ID: <bug-24389-11529@http.gcc.gnu.org/bugzilla/> (raw) Creating two files: ==== t1.cpp === #include <tr1/unordered_map> std::tr1::unordered_map<int,int> map1; int main() {} ==== t2.cpp ==== #include <tr1/unordered_map> std::tr1::unordered_map<int, float> map; int t2(int i) { return 0; } ============= compiling them with g++ -Wall t1.cpp t2.cpp leads to compiler output: t2.o:(.bss+0x20): multiple definition of `std::tr1::placeholders::(anonymous namespace)::_10' t1.o:(.bss+0x20): first defined here t2.o:(.bss+0x21): multiple definition of `std::tr1::placeholders::(anonymous namespace)::_9' t1.o:(.bss+0x21): first defined here t2.o:(.bss+0x22): multiple definition of `std::tr1::placeholders::(anonymous namespace)::_8' t1.o:(.bss+0x22): first defined here t2.o:(.bss+0x23): multiple definition of `std::tr1::placeholders::(anonymous namespace)::_7' t1.o:(.bss+0x23): first defined here t2.o:(.bss+0x24): multiple definition of `std::tr1::placeholders::(anonymous namespace)::_6' t1.o:(.bss+0x24): first defined here t2.o:(.bss+0x25): multiple definition of `std::tr1::placeholders::(anonymous namespace)::_5' t1.o:(.bss+0x25): first defined here t2.o:(.bss+0x26): multiple definition of `std::tr1::placeholders::(anonymous namespace)::_4' t1.o:(.bss+0x26): first defined here t2.o:(.bss+0x27): multiple definition of `std::tr1::placeholders::(anonymous namespace)::_3' t1.o:(.bss+0x27): first defined here t2.o:(.bss+0x28): multiple definition of `std::tr1::placeholders::(anonymous namespace)::_2' t1.o:(.bss+0x28): first defined here t2.o:(.bss+0x29): multiple definition of `std::tr1::placeholders::(anonymous namespace)::_1' t1.o:(.bss+0x29): first defined here t2.o:(.bss+0x2a): multiple definition of `std::tr1::(anonymous namespace)::ignore' t1.o:(.bss+0x2a): first defined here t2.o:(.data+0x0): multiple definition of `_ZN8Internal1XIXT_EE8n_primesE' t1.o:(.data+0x0): first defined here ========== Thus preventing use of two unordered_map's in a single application. g++ -v: Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --enable-checking=release i486-linux-gnu Thread model: posix gcc version 4.0.2 (Debian 4.0.2-2) -- Summary: tr1::unordered_map duplicate symbols (not extern?) Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: maarten dot keijzer at gmail dot com GCC host triplet: Linux version 2.6.10 GCC target triplet: g++ 4.0.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24389
next reply other threads:[~2005-10-15 20:08 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-10-15 20:08 maarten dot keijzer at gmail dot com [this message] 2005-10-15 20:15 ` [Bug c++/24389] " pinskia at gcc dot gnu dot org 2005-10-15 20:21 ` pinskia at gcc dot gnu dot org 2005-10-15 20:28 ` pcarlini at suse dot de 2005-10-15 20:32 ` [Bug c++/24389] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org 2005-10-15 20:42 ` [Bug c++/24389] [4.0/4.1 Regression] template variable not getting marked as weak pinskia at gcc dot gnu dot org 2005-10-15 20:45 ` pinskia at gcc dot gnu dot org 2005-10-16 20:19 ` mmitchel at gcc dot gnu dot org 2005-10-16 23:16 ` cvs-commit at gcc dot gnu dot org 2005-10-16 23:18 ` cvs-commit at gcc dot gnu dot org 2005-10-16 23:19 ` mmitchel at gcc dot gnu dot org 2005-10-16 23:19 ` cvs-commit at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-24389-11529@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).