Problems while linking

Dear Folks,

while trying to use pgi-5.1-2 for a quite large software, I got lots of Linker messages reporting “undefined reference to”'s.

because some of these messages dealing with standard-function such as

undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))’

or:

undefined reference to `std::string::~string()’

I do not now what’s wrong.

actually I use “-c -O3 -Munroll -fastsse -tp k8-64” for compiling and “-O3 -o $(RUNFILE) -fastsse -tp k8-64 -lgcc -lc” for linking.
I also skipped the “-fastsse”, the “-tp k8-64” and “-lc” or “-lgcc” in any permutation, but all with the same result: linking errors :-(

Does anybody have an idea, what’s going wrong?

I’m Running SuSE SLES-8 for AMD64 with libc 2.2.5.

BTW: gcc-3.2.2 runs that software perfectly :-(

Thanks,

Bjørn

Hi Bjorn,


This type of error typically occurs when a user installs the C++ compilers on an unsupported system since much of the C++ Standard Template Library must be ported with each new version of glibc. However, SLES8.0 with service pack 2 is a supported system so should just work.

Another possibilty is that your using an installation for a different glibc. Did you install this directly on the SLES8.0? Did you update your version of GCC without re-installing pgCC? If either are true, then try re-installing.

Thanks,
Mat