On Apr 11, 2000, Kevin Atkinson <[EMAIL PROTECTED]> wrote:

>> You're linking C++ libraries to a C program?  That seems a bit odd.  Did I
>> misunderstand you?

> Why?  I have a library that is written in C++ but I would like C
> programs to be able to use my library via extern "C" functions.
> What is so strange about that?

You'll be tying the users of any other programs or libraries going to
be linked together with yours to the same C++ compiler.  That's
because `cout' has a difference representation in each compiler, and
each one may try to initialize it assuming its own layout.

It's not clear to me whether this depends on `cout' being used by your
library.  I believe the mere fact of having the C++ (shared) library
linked into a program causes `cout' to be initialized.

-- 
Alexandre Oliva    Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me

Reply via email to