From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079072816018.tru64-unix-managers.marc@archive.invalid> From: carmen () wistar ! upenn ! edu (San Martin, Carmen) Date: Fri, 10 Sep 1999 17:59:50 +0000 To: tru64-unix-managers Subject: g++ compilation in OSF X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079072816018 Dear All, I am trying to compile a software package written in C++ in my ALPHA 433 with OSF1 V4.0D using g++ (version 2.8.1). I have successfully compiled the same programs in a silicon graphics box (IRIX 6.5) and in a SUN box (solaris 2.4) using the very same version of the gnu compiler. Now, when I compile the programs in the OSF box I get some "undefined symbol" errors. As far as I understand the problem (my knowledge of C++ is very limited, so if the following description sounds a bit bizarre please forgive me) the error came from the fact that some class/functions are defined using templates. As compilers are very smart they do not generate real code (something executable in a .o file) for a given function if it is not explicitly called. The very first thing this package does is to create a shared library. To force the compiler to create the code there is one file that explicitly calls all the functions generated using templates. My guess is that the alpha linker (in its default configuration) does not like this trick. Can anyone suggest any solution for this problem? Any comment will be well come cheers Roberto