From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4150 invoked by alias); 3 Nov 2002 04:56:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 4105 invoked by uid 71); 3 Nov 2002 04:56:01 -0000 Resent-Date: 3 Nov 2002 04:56:01 -0000 Resent-Message-ID: <20021103045601.4104.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, mjmaterna60193@yahoo.com Received: (qmail 5870 invoked by uid 61); 3 Nov 2002 04:50:01 -0000 Message-Id: <20021103045001.5868.qmail@sources.redhat.com> Date: Sat, 02 Nov 2002 20:56:00 -0000 From: mjmaterna60193@yahoo.com Reply-To: mjmaterna60193@yahoo.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/8434: Template Inclusion - keyword 'export' not implemented X-SW-Source: 2002-11/txt/msg00118.txt.bz2 List-Id: >Number: 8434 >Category: c++ >Synopsis: Template Inclusion - keyword 'export' not implemented >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sat Nov 02 20:56:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Mark J. Materna >Release: 2.95.3-216 >Organization: >Environment: Linux >Description: Because the keyword export is not yet implemented it seems that I can not have separatley complied template definitions. Without the key word "export" when a templated class is declared in a .h and defined in a .cpp, when linking the templated class does not seem to be accessable to other translation units. This is expected according to Stroustrup. Is there another way around this? (Putting the definition in the include is really not ideal because the templated class will be widely used.) I do require this functionality. See attached file for an example. The complie command is: g++ main.cpp matrix.cpp -o matrix >How-To-Repeat: g++ main.cpp matrix.cpp -o matrix >Fix: >Release-Note: >Audit-Trail: >Unformatted: