Is there any known problem with mixed sparc C++ compiler and gcc compiled static lib

Is there any known problem with mixed sparc C++ compiler and gcc compiled static lib

Post by Richard W » Thu, 24 Feb 2000 04:00:00



Hi ,

I am trying to use freeaware which was compiled with gcc, with Sparc C++ 4.2
compiler. And does anyone know any problem with this?

Thanks in advance!

Richard

 
 
 

Is there any known problem with mixed sparc C++ compiler and gcc compiled static lib

Post by Andy Plat » Thu, 24 Feb 2000 04:00:00



> Hi ,

> I am trying to use freeaware which was compiled with gcc, with Sparc C++ 4.2
> compiler. And does anyone know any problem with this?

If the interfaces to the library are C you should be fine; if they are
C++ you are out of luck.

Andy.

--
I'm not really here - it's just your warped imagination.

 
 
 

1. C++ linking problem creating a static lib from another static lib.

Hi everybody,

I am working under Solaris 2.8 and compiling/linking C++ code using SUN
Workshop 6.

What I need to do is creating a static library linking my own C++ objects
with a provided static library.
The provided library is installed in :

/soft/externalTool/lib/libFoo.a

I need to build the static library "myLib.a" which depends on the
"libFoo.a" library.
My link command is :

CC -xar -o myLib.a myObj1.o myObj2.o -L/soft/externalTool/lib -Bstatic -
lFoo

When I do "nm -A myLib.a", I can see that the external symbols which belong
to "libFoo.a" are undefined in "myLib.a".

Removing the "-lFoo" link option gives exactly the same result => it is as
if I was my C++ objects were never linked with "libFoo.a".

If I try to make a shared library using the following command (changing the
-xar option to -G):

CC -G -o myLib.so myObj1.o myObj2.o -L/soft/externalCompany/lib -Bstatic -
lFoo

It works perfectly and I have no undefined symbols.
I do not understand why linking succeed when doing a dynamic library
whereas it fails doing a static library.

Does anyone have an explanation ?
Do you know what is wrong ?
Can anyone give me the right command line for statically linking
successfully ?

Thanks in advance (it makes me crazy !)

2. No Voodoo banshee for X ?

3. Mixing c++ libs from different compilers

4. configuring sendmail for solaris 2.

5. /usr/lib/gcc-lib/i386-linux and /usr/lib/gcc-lib/i486-linux

6. Removing solaris daemons ?

7. Problem with compiling c++ source with GNU gcc compiler

8. 40 GB Seagate disk and only 8 GB usable

9. Utility To Determine Static Libs In An Application (ldd for static libs)

10. C++ compilers, NIH C++ class lib

11. Mixing static and dyn. libs

12. linking (mixing shared libs and static archives)