This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12104] Create an archive that uses templates
- From: "menita dot singh at schwab dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Aug 2003 15:35:11 -0000
- Subject: [Bug c++/12104] Create an archive that uses templates
- References: <20030829144929.12104.menita.singh@schwab.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12104
------- Additional Comments From menita dot singh at schwab dot com 2003-08-29 15:35 -------
Thanks, when i use the -frepo option i get a .rpo file, for each source. I use
g++ -g -frepo -I./ -c sync.cpp
g++ -g -frepo -I./ -c type.cpp
Then i create an archive using
ar r libcpp.a sync.o type.o. [ if i use CC [solaris], i have to use CC -xar, if
i use templates..]
Archive creates fine, with ar also.
Now, i use this libcpp.a in my main application, with linking option -l, and
get errors at linking "undefined reference"- to all my template instantiation.
BUT, how to use these .rpo files, so that i don't get these link errors ??