From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 819 invoked by alias); 23 Nov 2003 22:06:57 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 812 invoked from network); 23 Nov 2003 22:06:57 -0000 Received: from unknown (HELO web41108.mail.yahoo.com) (66.218.93.24) by sources.redhat.com with SMTP; 23 Nov 2003 22:06:57 -0000 Message-ID: <20031123220656.53477.qmail@web41108.mail.yahoo.com> Received: from [128.12.51.83] by web41108.mail.yahoo.com via HTTP; Sun, 23 Nov 2003 14:06:56 PST Date: Sun, 23 Nov 2003 22:06:00 -0000 From: Dara Hazeghi Subject: Re: missing function To: codaditasso@tiscali.it Cc: gcc-help@gcc.gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-11/txt/msg00303.txt.bz2 Hello, template definitions must be present to their callers, ie when gcc finishes preprocessing prova91.cpp, it must see the contents of prova92.cpp (where you define prova). The conventional method of doing this is a bit weird, but something like this: change prova92.h to read: #ifndef _prova92_h #define _prova92_h template void prova(T k); #include "prova92.cpp" #endif To compile, you just compile prova91.cpp, and everything gets pulled in as needed. Hope that helps, Dara __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/