Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #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
  #2 (permalink)  
Old 03-08-2004
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
If Matlab is plain C, then you can use the GCC 3.3 library. If it's written in C++, then this doesn't work, because the binary C++ format has changed between 2.95.x and 3.3.x.
Reply With Quote
  #3 (permalink)  
Old 03-08-2004
galbe galbe is offline
Registered User
 
 
Join Date: Oct 2003
Location: Bielefeld/Germany
Posts: 25
Unfortunatly matlab is programmed using c++.
Reply With Quote
  #4 (permalink)  
Old 03-08-2004
bernard's Avatar
bernard bernard is online now
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 816
Hello,

Maybe your best option is to use an Ice 1.0.1/GCC 2.95.3 build with Matlab: see Can Ice be compiled with gcc 2.95?

If you really need to mix C++ compilers, you could try to combine everything in a single library linked with -Bsymbolic ... but I am not very optimistic.

Cheers,
Bernard
Reply With Quote
  #5 (permalink)  
Old 03-08-2004
galbe galbe is offline
Registered User
 
 
Join Date: Oct 2003
Location: Bielefeld/Germany
Posts: 25
Thanx for your help.

Unfortunatly I REALLY have to mix compilers...

Well, I'll give it a try..

By the way

Thanx to ervyone at ZeroC for all the support I got: My diplomthesis, which is based on Ice reveived a "very good".

Thanx again
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Static linking (again) joe Comments 2 06-02-2006 09:26 AM
Ice-3.0.1 with a non standard install of DB josephwinston Patches 1 05-23-2006 02:23 PM
ICE Interaction with Other Libs tony_h Help Center 3 09-21-2004 02:21 PM
vc static lib hellocyf Help Center 2 08-04-2004 11:53 PM
force use of specific Slice libs (cross compiling) rbx Help Center 1 12-09-2003 03:14 PM


All times are GMT -4. The time now is 10:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.