Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: pedwards@cs.wright.edu (Phil Edwards)
Subject: Re: DEC CXX and Templates - Please help!
Date: 1998/01/08	[thread overview]
Message-ID: <693m4i$j47$1@alpha.wright.edu> (raw)
In-Reply-To: 34B2FC32.41C6@iinet.net.au


Truly massive and overblown Newsgroups: line trimmed.


Andrew Ellerton  <ellers@iinet.net.au> wrote:
+ Hi all,
+ 
+ I really need your help!
+ I'm porting a large C++ project to DEC OSF Unix v4.0, using 
+ DEC CXX 5.5. Its all going along fine until it trys to 
+ link it - All template symbols cannot be found. 
+ 
+ I made a tiny separate program, just trying to see how this
+ version of DEC handles it - it worked fine, with no extra switches
+ on the compile line! 
+ 
+ Are there any tricks or hints anyone can give me? I'd be
+ very very grateful!

If you could post (to one newsgroup only?) the command line you're using,
and perhaps the exact error, it would help.

I recently used the same version of cxx on a large project, lots of
templates and subdirectories, etc, etc.  I found out the hard way that cxx
is /very/ picky about the location of the template repository.  Make certain
that /all/ of your compiles are pointing to one single directory
("cxx_repository" is the default).

Moreover, the compiler builds in a relative path to the repo.  So if you
compile in /topdir/src1 and /topdir/src2, and both runs refer to a repo in
/topdir/cxx_repository, then the opject files will refer to other objects in
"../cxx_repository".  So you must perform the final link stage one directory
up-and-over from the repo, in this case.  You should also give the path to
that directory on the command line to the compiler driver/linker, even
though it's somewhat hardcoded in the object files using the templates.

Annoying, but since I was compiling in five or six subdirectories, and
linking in a subdirectory just for that purpose, it worked out okay once I
figured out what was going on.

Lemme know if something else goes weird; I've just been through that same
thing.


Luck++;
/dev/phil

=> If you post a followup, please don't email a copy to me.  I read news
    often enough that replying to things twice is annoying.  But thanks.




  reply	other threads:[~1998-01-08  5:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-07  5:00 DEC CXX and Templates - Please help! Andrew Ellerton
1998-01-08  5:00 ` Phil Edwards [this message]
1998-01-08  5:00 ` Alan H. Martin
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