From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,928f8bee559cdab2 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-11-01 05:47:16 PST Newsgroups: comp.unix.tru64 Date: Thu, 1 Nov 2001 14:47:06 +0100 From: Andreas Unterkircher X-X-Sender: unterkir@trane.ethz.ch To: Tobias Ernst Subject: Re: CXX compiler problem In-Reply-To: <1004614139@f1.n7600.z242.fido.de> Message-ID: References: <1004614139@f1.n7600.z242.fido.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII NNTP-Posting-Host: trane.ethz.ch X-Trace: 1 Nov 2001 14:47:10 +0100, trane.ethz.ch Organization: Swiss Federal Institute of Technology (ETHZ) Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-ge.switch.ch!news-zh.switch.ch!pfaff.ethz.ch!trane.ethz.ch!unterkir Xref: archiver1.google.com comp.unix.tru64:5614 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 > I have a problem with the template instantiation code in CXX on this > platform: > > tobi@caracal(524):~/appt/pore> uname -a; cxx -V; cc -V > OSF1 caracal.ica1.uni-stuttgart.de V5.0 910 alpha > Compaq C++ V6.3-014 for Digital UNIX V5.0 (Rev. 910) > Compiler Driver V6.3-014 (cxx) cxx Driver > Compaq C V6.4-214 (dtk) on Digital UNIX V5.0 (Rev. 910) > Compiler Driver V6.4-014 (dtk) cc Driver > > The error I get when linking my application is this: > > Unresolved: > GrayHist, 3>::porosity(void) > GrayHist, 3>::alt_specsurf(void) > > Now the problem is that the class PTC_ParaIArray is defined as > > template > class PTC_ParaIArray:public PTC_ParaIArray_Base > {...}; > > So you see that the type parameter T must be first and the integer > parameter NDIM must be last. The file that provides alt_specsurf and > porosity contains the correct symbols (verified with nm): > > GrayHist, 3>::alt_specsurf(void) > GrayHist, 3>::porosity(void) > > However, for some mysterious reason, the object file where I call these > functions mysteriously contains requests for > > GrayHist, 3>::alt_specsurf(void) > GrayHist, 3>::porosity(void) > > i.E. the integer parameter 3 before the type parameter signed char. > > The cxx files that produce those two object files include the SAME .h > file with the definitions of PTC_ParaIArray. So why on earth does cxx > resort the template parameters in the one object file, but not in the > other !? [..]