Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: "Kenneth Block" <krblock@computer.org>
Subject: Re: CXX compiler problem
Date: Fri, 2 Nov 2001 08:45:53 -0500	[thread overview]
Message-ID: <msxE7.1244$RL6.27173@news.cpqcorp.net> (raw)
In-Reply-To: Pine.SGI.4.40.0111011441110.7631-100000@trane.ethz.ch

"Andreas Unterkircher" <unterkir@ivp.bepr.ethz.ch> wrote in message
news:Pine.SGI.4.40.0111011441110.7631-100000@trane.ethz.ch...
>
> I'm not sure whether this is the source of your problem but I remember
> that I once also had problems with cxx's template instantiaton. I wanted
> to link a library to my C++ program and I also got messages similar to
> your messages. The problem was that the library and the program did not
> use the same cxx_repository directory. Are you sure that you always use
> the same cxx_repository ? You can control it with the -ptr flag.
>
> HTH,
> Andreas

Or you can just link you templates staticly into every module that uses
them. This is what GCC does. There are two problems with doing this. 1) This
can cause you executable to become large. 2) Static data that should have
only a single copy will be duplicated.

If gcc is your compiler of choice, you can do "-std gnu" to get Compaq C++
to act more like it. If you prefer a more ANSI/ISO compliant compiler, but
want templates compiled staticly, you can do "-tlocal".





      reply	other threads:[~2001-11-02 13:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-01 10:20 CXX compiler problem Tobias Ernst
2001-11-01 13:47 ` Andreas Unterkircher
2001-11-02 13:45   ` Kenneth Block [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox