[haiku-development] Re: runtime_loader question

  • From: "Stephan Assmus" <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 14 Mar 2009 12:02:07 +0100

Hi,

Von: "Grzegorz Dąbrowski" <grzegorz.dabrowski@xxxxxxxxx>
> I have a problem with runtime loader on hybrid system. Consider
> following example:
> 
> /boot/beos/system/lib/libgame.so (GCC4) (a)
> /boot/beos/system/lib/gcc2/libgame.so (GCC2) (b)
> /boot/comon/lib/libSDL.so (GCC2) (c)
> 
> libSDL.so is linked against libgame.so
> 
> and I have two programs, the first one "test-gcc2" is compiled by gcc2
> and the second one "test-gcc2" by gcc4...
> test-gcc2 and test-gcc4 are linked against libSDL.so
> 
> test-gcc2 works correctly because it loads "c" and "b"
> test-gcc4 doesn't work (undefined symbol, which is available in "b")
> because it loads "c" and "a"
> 
> Is it possible to make test-gcc2 and test-gcc4 work correctly?

Intuitively I would say that you need a GCC2 and a GCC4 compiled libsdl.so.

/boot/comon/lib/libSDL.so (GCC4) (c)
/boot/comon/lib/gcc2/libSDL.so (GCC2) (d)

I am pretty sure that libSDL.so contains and needs to interface with C++ 
classes, so it cannot be used by a GCC4 compiled program if the lib is a GCC2 
version.

Best regards,
-Stehan

Other related posts: