This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12104] Create an archive that uses templates


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 ??


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]