Linking GCC compiled shared library using SunStudio - Unix

This is a discussion on Linking GCC compiled shared library using SunStudio - Unix ; Hi, I have big problem, I have just compiled my libraries with g++ 3.4 and it works well, but I need to plugin that libraries inside Sun studio compiled application. Now I can NOT use the Sun workshop to compile ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Linking GCC compiled shared library using SunStudio

  1. Linking GCC compiled shared library using SunStudio

    Hi,

    I have big problem,

    I have just compiled my libraries with g++ 3.4 and it works well, but
    I need to plugin that libraries inside Sun studio compiled
    application.

    Now I can NOT use the Sun workshop to compile my shared libraries
    becasue there is an official bug and it did not compile it.

    So please do you know if there is just a way to link the g++ shared
    libraries in Sun studio application ?

    thanks a lot

    Rgds
    Antonio

  2. Re: Linking GCC compiled shared library using SunStudio

    adisabat@gmail.com wrote:
    > Hi,
    >
    > I have big problem,
    >
    > I have just compiled my libraries with g++ 3.4 and it works well, but
    > I need to plugin that libraries inside Sun studio compiled
    > application.
    >
    > Now I can NOT use the Sun workshop to compile my shared libraries
    > becasue there is an official bug and it did not compile it.
    >
    > So please do you know if there is just a way to link the g++ shared
    > libraries in Sun studio application ?
    >

    No. Not unless there is a C linkage interface you can use.

    --
    Ian Collins

  3. Re: Linking GCC compiled shared library using SunStudio

    "adisabat@gmail.com" writes:
    >I have big problem,


    >I have just compiled my libraries with g++ 3.4 and it works well, but
    >I need to plugin that libraries inside Sun studio compiled
    >application.


    >Now I can NOT use the Sun workshop to compile my shared libraries
    >becasue there is an official bug and it did not compile it.


    >So please do you know if there is just a way to link the g++ shared
    >libraries in Sun studio application ?



    There's no way to have portable C++ libraries because every compiler
    mangles the symbols differently.

    I'm afraid you'll have to work around whatever bug in SunStudio you've
    found if you need SunStudio compatible C++ libraries.



  4. Re: Linking GCC compiled shared library using SunStudio

    On Nov 3, 2:08 pm, Doug McIntyre wrote:
    > "adisa...@gmail.com" writes:
    > >I have big problem,
    > >I have just compiled my libraries with g++ 3.4 and it works well, but
    > >I need to plugin that libraries inside Sun studio compiled
    > >application.
    > >Now I can NOT use the Sun workshop to compile my shared libraries
    > >becasue there is an official bug and it did not compile it.
    > >So please do you know if there is just a way to link the g++ shared
    > >libraries in Sun studio application ?


    > There's no way to have portable C++ libraries because every
    > compiler mangles the symbols differently.


    That's not really the issue. The reason here is that Sun CC and
    g++ lay out classes (vtable, etc.) differently. All the name
    mangling means is that you get the error at link time, rather
    than a mysterious crash at runtime.

    --
    James Kanze (GABI Software) email:james.kanze@gmail.com
    Conseils en informatique orientée objet/
    Beratung in objektorientierter Datenverarbeitung
    9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

+ Reply to Thread