On May 14, 2004, at 3:30 PM, Ron Blaschke wrote:

Friday, May 14, 2004, 11:48:00 PM, Andy Dougherty wrote:

IMHO, we are currently talking C only, so that shouldn't be a problem. I
hope anybody tells me if I'm wrong.
Still, I am curious. Why would the linker need to know about C or C++?

I thought ICU contained some C++ files. As to why we care, you might need different
libraries for c versus c++. For example, the Solaris c++ man page has this note:
By default, the CC driver passes the following -l options to ld:

-lC -lC_mtstubs -lm -lw -lcx -lc

There are likely other issues too, but that's the first one that comes to mind.

Of course, to build ICU the flags would be necessary, but we're not building it directly - we are asking it to build itself, and then we just link to the resulting library, which shouldn't need anything special. Am I getting things wrong here?

When linking against ("using") a static library version of ICU, we need a C++-aware linker (because ICU contains C++ code); with a dynamic-library version of ICU presumably we wouldn't.


Seemingly, on Unix-ish platforms at least, using 'c++' for the linker for everything (even for just C code) has worked so far for parrot, but this might not always be the case. As Andy indicated, I think what this ultimately does (for some cases) is call 'ld' with a few extra libraries to link against.

JEff



Reply via email to