public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Crosscompiler C/C++ developement.
@ 2002-05-29  7:15 Immanuel Litzroth
  2002-05-30 13:43 ` Nix
  0 siblings, 1 reply; 2+ messages in thread
From: Immanuel Litzroth @ 2002-05-29  7:15 UTC (permalink / raw)
  To: gcc

My company sells a mulitplatform library written in C++. One of our
clients wishes to use this library on AIX, using the xlC compiler and
the C language. We developed a C wrapper round the C++ core to this
end. Since our version of the xlC compiler has minimal C++ support we
wish to explore the following path:
1) use gcc to compile the C++ core and the the C wrapper.
2) create a static library to deliver to the customer.
3) the customer uses xlC to compile and link to our library.
the problem is that a test application generated according to this
scenario requires me to link with libsupc++.a and libgcc.a and results
in an application that dumps core.

Can anyone tell if
1) this scenario is feasible
2) how to go about creating a fully functional application
All information is welcome
Immanuel
***************************************************************************
His endeavours to improve these conditions by innovations in the
current methods of teaching are fully described in his writings; these
made him unpopular with his brethren in the order and led to his
removals to the monastery of Pomposa near Ferrara, Italy. Here the
same lot seems to have befallen him. 
About Guido of Arezzo

Immanuel Litzroth
Email: Immanuell@enfocus.be
***************************************************************************

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Crosscompiler C/C++ developement.
  2002-05-29  7:15 Crosscompiler C/C++ developement Immanuel Litzroth
@ 2002-05-30 13:43 ` Nix
  0 siblings, 0 replies; 2+ messages in thread
From: Nix @ 2002-05-30 13:43 UTC (permalink / raw)
  To: Immanuel Litzroth; +Cc: gcc

On Wed, 29 May 2002, Immanuel Litzroth mused:
>      Since our version of the xlC compiler has minimal C++ support we
> wish to explore the following path:
> 1) use gcc to compile the C++ core and the the C wrapper.
> 2) create a static library to deliver to the customer.
> 3) the customer uses xlC to compile and link to our library.
> the problem is that a test application generated according to this
> scenario requires me to link with libsupc++.a and libgcc.a and results
> in an application that dumps core.

If some C++ parts of a program are built by GCC, the program must be
linked by GCC. GCC runs a program called `collect2' to arrange for
global constructors and destructors to be called at the right time, and
such things.

> Can anyone tell if
> 1) this scenario is feasible

Not really, no :( you could always try to get collect2 to work outside
of GCC, but I don't know how big a job that would be.

You could alternatively use `gcc -v' to find out what command-line
collect2 is called with when linking your application, and call it in
the same way on the customer site to do the linking. (But this is rather
inelegant...)

> 2) how to go about creating a fully functional application

Using GCC to link is the easiest course by far.

-- 
`What happened?'
                 `Nick shipped buggy code!'
                                             `Oh, no dinner for him...'

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-30 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-29  7:15 Crosscompiler C/C++ developement Immanuel Litzroth
2002-05-30 13:43 ` Nix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).