From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Greene To: egcs@cygnus.com Subject: Template Instantiation Date: Sun, 08 Feb 1998 11:38:00 -0000 Message-id: X-SW-Source: 1998-02/msg00301.html First off, great job with egcs! This project is a BIG help! Now on to the question: Can someone clarify exactly how template instantiation works in egcs? I'm using x86/Linux/ELF and SPARC/Solaris systems. I've been using -frepo when linking object files. When creating liraries, I've been manually instantiating templates though IIRC, someone mentioned that this wasn't necessary. In the (very outdated) g++ FAQ at www.cygnus.com, I found this passage: Jason Merrill writes: "To perform closure on a set of objects, just try to link them together. It will fail, but as a side effect all needed instances will be generated in the objects." Maybe I'm dense, but I don't understand this. If I link object files using -frepo, recompilation takes place and there is no failure. If I link using libraries, it fails, but nothing gets generated. I also seem to recall someone indicating that -frepo wasn't necessary under ELF. Is this true? It would certainly reduce build times. What do I do to get everything to link correctly? Thanks much for the help! -Dave