From: jkolen AT typhoon DOT coginst DOT uwf DOT edu (John F. Kolen) Subject: Re: g++ problem "-fno-implicit-templates" 14 Nov 1997 12:16:15 -0800 Message-ID: <9711140940.ZM12639.cygnus.gnu-win32@typhoon.coginst.uwf.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: gnu-win32 AT cygnus DOT com, Russ Vreeland My experiences with g++ under gnuwin have been similar. After beating on the template problem for a while, I finaly came up with the following solution: use -frepo. Here's what I have to do 1. Compile all the modules with the -frepo flag. 2. Attempt to link the modules normally and save the linker error messages. 3. Explicitly declare the missing template expansions in one of the modules (I normally put these in the module with main()). 4. Repeat steps 1, 2 and 3 until no more linker errors. For instance, the last time I compile something with g++ I had to add the following lines to one of the modules: template class __default_alloc_template; template class __malloc_alloc_template<0>; template void list >::clear(void); template void list >::clear(void); Note that I was using STL's list template ( list and list ) and needed the later two template instantiations. Hopefully this problem with -frepo will be cleaned up in later versions of g++. Also, I found "Mumit's STL Newbie guide" to be very helpfull in finding this solution. John -- John F. Kolen voice: (850)474-3075 Assistant Professor fax: (850)474-3023 Dept. of Computer Science University of West Florida Pensacola, FL 32514 - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".