public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25107] New: undefined reference even though the template is instantiated
@ 2005-11-26 18:26 smirolo at hotmail dot com
2005-11-26 18:28 ` [Bug c++/25107] " smirolo at hotmail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: smirolo at hotmail dot com @ 2005-11-26 18:26 UTC (permalink / raw)
To: gcc-bugs
I get a different behavior when compiling on powerpc/MacOSX 10.3.9 and
i686/Linux. In the first case,
the symbol is undefined while in the second case it is weak and thus link
correctly.
#include <iostream>
#include "boost/dynamic_bitset.hpp"
int main( int argc, char *argv[] )
{
boost::dynamic_bitset<> aDynBitset;
std::cout << aDynBitset.count() << std::endl;
return 0;
}
g++ -v --save-temps -I${HOME}/installed/local/include -o test_dynamic_bitset
test_dynamic_bitset.cc > test_dynamic_bitset.log 2>&1
'nm test_dynamic_bitset.o' outputs
On MacOSX:
U boost::detail::dynamic_bitset_count_impl::count_table<true>::table
On linux:
00000000 V
boost::detail::dynamic_bitset_count_impl::count_table<true>::table
I would expect the behavior to be the same on both systems, mostly the same as
on linux.
--
Summary: undefined reference even though the template is
instantiated
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: smirolo at hotmail dot com
GCC host triplet: powerpc-darwin
GCC target triplet: powerpc-darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25107
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/25107] undefined reference even though the template is instantiated
2005-11-26 18:26 [Bug c++/25107] New: undefined reference even though the template is instantiated smirolo at hotmail dot com
@ 2005-11-26 18:28 ` smirolo at hotmail dot com
2005-11-26 18:29 ` smirolo at hotmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: smirolo at hotmail dot com @ 2005-11-26 18:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from smirolo at hotmail dot com 2005-11-26 18:28 -------
Created an attachment (id=10342)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10342&action=view)
source file to reproduce the problem
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25107
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/25107] undefined reference even though the template is instantiated
2005-11-26 18:26 [Bug c++/25107] New: undefined reference even though the template is instantiated smirolo at hotmail dot com
2005-11-26 18:28 ` [Bug c++/25107] " smirolo at hotmail dot com
@ 2005-11-26 18:29 ` smirolo at hotmail dot com
2005-11-26 18:30 ` smirolo at hotmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: smirolo at hotmail dot com @ 2005-11-26 18:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from smirolo at hotmail dot com 2005-11-26 18:29 -------
Created an attachment (id=10343)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10343&action=view)
save-temps on macos
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25107
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/25107] undefined reference even though the template is instantiated
2005-11-26 18:26 [Bug c++/25107] New: undefined reference even though the template is instantiated smirolo at hotmail dot com
2005-11-26 18:28 ` [Bug c++/25107] " smirolo at hotmail dot com
2005-11-26 18:29 ` smirolo at hotmail dot com
@ 2005-11-26 18:30 ` smirolo at hotmail dot com
2005-11-26 18:30 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: smirolo at hotmail dot com @ 2005-11-26 18:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from smirolo at hotmail dot com 2005-11-26 18:30 -------
Created an attachment (id=10344)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10344&action=view)
output log on macos
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25107
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/25107] undefined reference even though the template is instantiated
2005-11-26 18:26 [Bug c++/25107] New: undefined reference even though the template is instantiated smirolo at hotmail dot com
` (2 preceding siblings ...)
2005-11-26 18:30 ` smirolo at hotmail dot com
@ 2005-11-26 18:30 ` pinskia at gcc dot gnu dot org
2005-11-26 18:31 ` smirolo at hotmail dot com
2005-11-26 18:31 ` smirolo at hotmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-26 18:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2005-11-26 18:30 -------
This is a dup of bug 11026 which was fixed only for 4.0.0.
The work around is to instantiated explictly.
*** This bug has been marked as a duplicate of 11026 ***
*** This bug has been marked as a duplicate of 11026 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
Summary|undefined reference even |undefined reference even
|though the template is |though the template is
|instantiated |instantiated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25107
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/25107] undefined reference even though the template is instantiated
2005-11-26 18:26 [Bug c++/25107] New: undefined reference even though the template is instantiated smirolo at hotmail dot com
` (3 preceding siblings ...)
2005-11-26 18:30 ` pinskia at gcc dot gnu dot org
@ 2005-11-26 18:31 ` smirolo at hotmail dot com
2005-11-26 18:31 ` smirolo at hotmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: smirolo at hotmail dot com @ 2005-11-26 18:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from smirolo at hotmail dot com 2005-11-26 18:31 -------
Created an attachment (id=10346)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10346&action=view)
output log on linux
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25107
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/25107] undefined reference even though the template is instantiated
2005-11-26 18:26 [Bug c++/25107] New: undefined reference even though the template is instantiated smirolo at hotmail dot com
` (4 preceding siblings ...)
2005-11-26 18:31 ` smirolo at hotmail dot com
@ 2005-11-26 18:31 ` smirolo at hotmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: smirolo at hotmail dot com @ 2005-11-26 18:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from smirolo at hotmail dot com 2005-11-26 18:31 -------
Created an attachment (id=10345)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10345&action=view)
save-temps on linux
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25107
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-11-26 18:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-26 18:26 [Bug c++/25107] New: undefined reference even though the template is instantiated smirolo at hotmail dot com
2005-11-26 18:28 ` [Bug c++/25107] " smirolo at hotmail dot com
2005-11-26 18:29 ` smirolo at hotmail dot com
2005-11-26 18:30 ` smirolo at hotmail dot com
2005-11-26 18:30 ` pinskia at gcc dot gnu dot org
2005-11-26 18:31 ` smirolo at hotmail dot com
2005-11-26 18:31 ` smirolo at hotmail dot com
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).