|
|
Sun Studio/gcc compiler compatibility
Hello,
Can a library or an executable built on Solaris gcc load and call
routines from libraries built with platform specific compiler?
Thank you,
Alona
|
|
0
|
|
|
|
Reply
|
Alona
|
11/27/2009 2:48:23 PM |
|
Alona schrieb:
> Hello,
>
> Can a library or an executable built on Solaris gcc load and call
> routines from libraries built with platform specific compiler?
>
> Thank you,
> Alona
only for C objects of the same architecture, not for C++. The ABI is
different.
- Thomas
|
|
0
|
|
|
|
Reply
|
Thomas
|
11/27/2009 3:27:10 PM
|
|
Alona wrote:
> Hello,
>
> Can a library or an executable built on Solaris gcc load and call
> routines from libraries built with platform specific compiler?
If the answer was no, nothing compiled with gcc would work with the
system libraries!
--
Ian Collins
|
|
0
|
|
|
|
Reply
|
Ian
|
11/27/2009 7:58:11 PM
|
|
On Nov 27, 2:58=A0pm, Ian Collins <ian-n...@hotmail.com> wrote:
> Alona wrote:
> > Hello,
>
> > Can a library or an executable built on Solaris gcc load and call
> > routines from libraries built with platform specific compiler?
>
> If the answer was no, nothing compiled with gcc would work with the
> system libraries!
>
> --
> Ian Collins
My question was regarding C++ libraries.
|
|
0
|
|
|
|
Reply
|
Alona
|
11/27/2009 10:22:36 PM
|
|
Alona wrote:
> On Nov 27, 2:58 pm, Ian Collins <ian-n...@hotmail.com> wrote:
>> Alona wrote:
>>> Hello,
>>> Can a library or an executable built on Solaris gcc load and call
>>> routines from libraries built with platform specific compiler?
>> If the answer was no, nothing compiled with gcc would work with the
>> system libraries!
>>
>
> My question was regarding C++ libraries.
Then why didn't you say so, or mention g++ rather than gcc?
You can use C libraries, but not C++ ones unless they provide a C interface.
--
Ian Collins
|
|
0
|
|
|
|
Reply
|
Ian
|
11/27/2009 10:58:17 PM
|
|
On Fri, 27 Nov 2009 06:48:23 -0800 (PST), Alona <arossen@rogers.com> wrote:
> Hello,
>
> Can a library or an executable built on Solaris gcc load and call
> routines from libraries built with platform specific compiler?
Standard C code should mix, but beware of non-standard extensions (of
which Sun Studio has a few and GCC has a great many). C++ code will not
mix - different name mangling, different rtti and exception mechanisms
to mention but a few.
A bientot
Paul
--
Paul Floyd http://paulf.free.fr
|
|
0
|
|
|
|
Reply
|
Paul
|
11/29/2009 3:17:39 PM
|
|
|
5 Replies
309 Views
(page loaded in 0.136 seconds)
|
|
|
|
|
|
|
|
|