c++/8434: Template Inclusion - keyword 'export' not implemented

mjmaterna60193@yahoo.com mjmaterna60193@yahoo.com
Sat Nov 2 20:56:00 GMT 2002


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



More information about the Gcc-bugs mailing list