- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- Re: Template instantiation with gcc 3.3.3 - multip...
Operating System - Tru64 Unix
1752603
Members
5376
Online
108788
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-25-2004 05:27 AM
тАО03-25-2004 05:27 AM
Template instantiation with gcc 3.3.3 - multiple definitions
Running on OSF1 V5.1B Tru64 Unix. Using gcc 3.3.3 compiler to build objects. Using the ar -rcv command to generate an archive file. The ar command spews out 100's of warning messages, "ar: Warning: ignoring second definition of xxxxx in archive" for variables associated with template instantiations. This did not happen with previous release of gcc and OSF.
The GCC Manual (http://gcu.gnu.org/onlinedocs/gcc-3.3.3/gcc/Template-Instantiation.html) talks about 3 options for Template Instantiation. Our problem with multiple definitions probably has to do with taking the third option, "Do Nothing".
Does anyone have a feel for option one (using compiler option -frepo and collect2) or option two (using compiler option -fno-implicit-templates)?
Any insight on templates would be appreciated.
Thank you.
The GCC Manual (http://gcu.gnu.org/onlinedocs/gcc-3.3.3/gcc/Template-Instantiation.html) talks about 3 options for Template Instantiation. Our problem with multiple definitions probably has to do with taking the third option, "Do Nothing".
Does anyone have a feel for option one (using compiler option -frepo and collect2) or option two (using compiler option -fno-implicit-templates)?
Any insight on templates would be appreciated.
Thank you.
- Tags:
- Templates
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-30-2004 06:43 AM
тАО03-30-2004 06:43 AM
Re: Template instantiation with gcc 3.3.3 - multiple definitions
Further clarification of problem:
Whenever two object modules that include the same STL header (ie, fstream) are archived using the ar utility, multiple defines for assorted symbols are added to the symbol table in the archive. This causes the archive utility to issue a warning message for each multiple symbol.
Using the -frepo compiler option eliminated only about half of the duplicate symbols. Then the collect2 linker wrapper spewed out undefined symbol messages as part of its processing.
Has anyone been successful in using the new g++ with STL code, without drowning in a torrent of warning messages?
Since we can't change the STL headers, what other options do we have to handle STL instantiations?
I'm assuming that pre-compiled headers (mentioned by Josuttis) are not an option with g++?
Thanks again.
Submitted by the originator.
Whenever two object modules that include the same STL header (ie, fstream) are archived using the ar utility, multiple defines for assorted symbols are added to the symbol table in the archive. This causes the archive utility to issue a warning message for each multiple symbol.
Using the -frepo compiler option eliminated only about half of the duplicate symbols. Then the collect2 linker wrapper spewed out undefined symbol messages as part of its processing.
Has anyone been successful in using the new g++ with STL code, without drowning in a torrent of warning messages?
Since we can't change the STL headers, what other options do we have to handle STL instantiations?
I'm assuming that pre-compiled headers (mentioned by Josuttis) are not an option with g++?
Thanks again.
Submitted by the originator.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2005 06:59 AM
тАО09-21-2005 06:59 AM
Re: Template instantiation with gcc 3.3.3 - multiple definitions
Did you ever figure this one out? I'm having a similar problem, though not with templates. The problem really is that the inline functions don't get inlined and instead are preserved as symbolic names in each object file. Then, when you try to archive them together, you get multiple definition warnings. Supposedly, you can use -finline-size=n to increase the allowable size of an inlined function, but I had little luck with the option. Ideas?
Thanks,
--Steve (mrstephengross@hotmail.com)
Thanks,
--Steve (mrstephengross@hotmail.com)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP