pro64-support
[Top] [All Lists]

libstdc++ linkage problem

To: pro64-support@xxxxxxxxxxx
Subject: libstdc++ linkage problem
From: Clemens Helf <helf@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 24 Apr 2001 13:40:02 +0200
Sender: owner-pro64-support@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
Dear all,

sgiCC does not properly locate its 'libstdc++.a' under all circumstances.
Giving the linker option '-L/usr/lib', sgiCC will prefer to link 'libstdc++' 
from
'/usr/lib' instead of from somewhere within the compiler installation, in my 
case
probably 'usr/lib/gcc-lib/ia64-sgi-linux/sgicc-1.0.new'

The superflous mention of '/usr/lib' came from an environment variable, 
specifying
the location of libtcl.so, which was by chance installed in '/usr/lib'. 
'/usr/lib/
libstdc++.a' is the library for gcc, installed as well.
It will be preferable, if the compiler finds the correct library even in this 
case.
I only realized, that I got the wrong library, because an unresolved symbol 
error
occured. But how will you find the problem, if it occurs at runtime ?

Clemens Helf
helf@xxxxxxx

----main.cpp----

#include <iostream.h>

void main (void) {
  cout << "hello world !\n";
  }

--------
compile/link:
sgiCC main.cpp -L/usr/lib


<Prev in Thread] Current Thread [Next in Thread>
  • libstdc++ linkage problem, Clemens Helf <=