From: Alexander Sclearuc <avs@netinfo.moldova.net>
To: egcs@cygnus.com
Subject: Re: Re: Template compilation
Date: Fri, 08 May 1998 07:00:00 -0000 [thread overview]
Message-ID: <199805081359.PAA10201@gate.netinfo.moldova.net> (raw)
In-Reply-To: <orpvhphgdh.fsf@zecarneiro.lsd.dcc.unicamp.br>
Alexandre Oliva wrote:
> > I try to compile a simple template example (see attachments)
> > and I get the next error:
> > Undefined first referenced
> > symbol in file
> > ostream & operator<<<int>(ostream &, array1<int> const &)template.o
>
> Every template definition must be available whenever it is used for it
> to be implicitly instantiated (unless the template is defined with the
> `export' keyword, which is not implemented yet, anyway). So, move the
> contents of template1.C into template1.h and it should work.
Thank you for your answer, this variant works.
But I still have a question.
I compiled recently with MSVC one library and all was OK.
The README file says that the library could be compiled with
EGCS-1.0.2, so I tried to compile the library with it.
And I get a lot of errors like one pointed above.
It took me almost a day to understand what the problem is;)
I don't want to change all library sources and
I would like to know what the C++ standard says
about templates (from this point of view)
> > The standard C++ compiler for SCO (CC) compiles this example with
> > no problems.
> It probably uses some non-standard template repository mechanism.
Yes, it is a Cfront and it creates a repository directory
--
Alexander Sclearuc Phone: (373) 2 21 20 96
NetInfo S.R.L. Fax: (373) 2 21 20 96
Chisinau (373) 2 24 00 83
Moldova, Republic of mailto:avs@netinfo.moldova.net
next prev parent reply other threads:[~1998-05-08 7:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-07 10:22 Alexander Sclearuc
1998-05-07 17:39 ` JC Loredo-Osti
1998-05-07 17:39 ` Alexandre Oliva
1998-05-08 7:00 ` Alexander Sclearuc [this message]
1998-05-09 0:06 ` Martin von Loewis
1998-05-07 22:44 ` Robert Lipe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199805081359.PAA10201@gate.netinfo.moldova.net \
--to=avs@netinfo.moldova.net \
--cc=egcs@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).