View Single Post
  #1 (permalink)  
Old 03-08-2004
galbe galbe is offline
Registered User
 
 
Join Date: Oct 2003
Location: Bielefeld/Germany
Posts: 25
static linking of standard libs

I'm trying to use Ice together with matlab. This results in an segmentation fault, since matlab is compiled using gcc 2.95.x and I'm using gcc 3.3.1 to compile my Ice-using library and Ice.

When linking the library into matlab and initialising Ice I get a segmentation fault due to a buggy implementation of dynamic_cast

[see http://gcc.gnu.org/ml/gcc-bugs/2002-05/msg00964.html ]

My idea now is to statically link libstdc++ and libgcc into my application (and Ice), since I assume that the problem is caused by the fact, that matlab links to an older version of libstdc++ and incompatibility of the used RTTI.

My idea is to modify the LDFLAGS to something like:

LDFLAGS = -nodefaultlibs -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic <other libs>

Do you think, this can work, or do you have a better idea?

Thanx in advance

Gerald
Reply With Quote