From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,1be1c54d82dc4743,start X-Google-Attributes: gidfa528,public X-Google-Thread: 115614,1be1c54d82dc4743,start X-Google-Attributes: gid115614,public X-Google-ArrivalTime: 2001-10-16 18:00:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!newshub.sdsu.edu!csulb.edu!news.service.uci.edu!not-for-mail From: Charlie Zender Newsgroups: comp.unix.aix,comp.unix.tru64 Subject: IBM xlC and Compaq cxx problems, possibly related Date: Tue, 16 Oct 2001 17:49:49 -0700 Organization: University of California at Irvine Message-ID: <3BCCD5AD.70109@uci.edu> Reply-To: zender@uci_dot_edu NNTP-Posting-Host: dust.ps.uci.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012 X-Accept-Language: en-us Xref: archiver1.google.com comp.unix.aix:25467 comp.unix.tru64:5322 Hi, I have beegn migrating a large'ish C++ program from GNU/Linux platform where it was developed to IBM AIX and to Compaq Alpha supercomputers. I need a few pointers as the process is not as straightforward as I had hoped. First, the IBM compiler, xlC, compiles all the source files fine, but has problems linking. It does not seem to find templated functions unless the definitions (i.e., the real code) are placed in header files, where normally I would just place the function prototypes (and not the functions themselves). GNU g++ used to have this limitation, I remember, but, as of 2.96, does not seem to suffer from this limitation anymore. So my question is, is there a compiler/linker switch on the IBM that will allow me to keep the function definitions in the .cc files and not have to move them into the .hh files? Or can I somehow forward declare the templates I will actually be using so the compiler knows which ones to build so the linker can find them? Second, the Compaq Alpha compiler cxx compiles all the files in my program fine except for the main routine, where it just never finishes the compilation. I've let the machine (which is fast) chew up hours trying to compile this code, and, although the CPU usage is heavy, it never finishes compiling. I'm not using optimization switches either. Is this a known problem with the cxx compiler, or might I be doing something wrong? Anyone else encountered this? Might this problem be the Compaq cxx symptom of the template location discussed above? Thanks, Charlie -- Charlie Zender, zender at uci dot edu, (949) 824-2987, Department of Earth System Science, University of California, Irvine CA 92697-3100