mixing g++ libs with CC libs?

mixing g++ libs with CC libs?

Post by Lars Heckin » Fri, 23 May 1997 04:00:00




> I have a C++ library that I cannot get to compile (without
> significant modification) w/ Sun's CC compiler. I am however able to
> compile this 3rd party lib using the GNU g++ compiler. All of my other
> libs and applications, I have compiled w/ CC.  So, naturally, I want
> to be able to link this particular library w/ my other libs into several
> applications. Should I be able to link these libraries, once compiled,
> with either CC or g++ compiled applications???

> If so, when I try and link both types of libs w/ either compiler I get
> undefined symbol error messages during the link.  That is, if lib A was
> compiled w/ g++ and library B was compiled w/ CC, when I link application
> X w/ CC (using -lA -lB), it produces undefined symbols for the functions
> from A.  And when I link X w/ g++, I receive similar error messages for
> the functions in B.  What do I need to do, to link these libraries
> together into an application?

 You can't. Check the compiler dependencies section in the comp.lang.c++ FAQ.

<URL:http://www.cerfnet.com/~mpcline/On-Line-C++-FAQs/compiler-dependencie...[33.6]>, last time I checked.

 
 
 

mixing g++ libs with CC libs?

Post by Mike Cast » Fri, 23 May 1997 04:00:00



>I have a C++ library that I cannot get to compile (without
>significant modification) w/ Sun's CC compiler. I am however able to
>compile this 3rd party lib using the GNU g++ compiler. All of my other
>libs and applications, I have compiled w/ CC.  So, naturally, I want
>to be able to link this particular library w/ my other libs into several
>applications. Should I be able to link these libraries, once compiled,
>with either CC or g++ compiled applications???

No.

Different C++ compilers not only implement different sets of features of
the language, but also implement them in different manners.

So, as a rule, you do not want to link code compiled with two different
compilers, because the internals of the different object sets will most
likely work very differently.

To make sure you can't link them, different C++ compilers mangle the names
differently, ensuring that you will not be able to link the object files.

mrc

--
Mike Castle
System Administrator, Applied Computing Systems, Inc.

505-672-4003

 
 
 

mixing g++ libs with CC libs?

Post by Jim A'Har » Fri, 06 Jun 1997 04:00:00


I need to be able to find out the process that is listening on a
particular TCP port.  Does anybody know an easy way to do this?  None of
the standard commands(netstat -a, ndd /dev/tcp) give that information.  
Does this info even get stored in the kernel?

Thanks in advance.

Jim A'Hara
Systems Manager
ING-Barings London.


tel : +44 171 767 6616

 
 
 

mixing g++ libs with CC libs?

Post by Dan Anders » Fri, 06 Jun 1997 04:00:00


lsof (public domain) is usually a good tool for something like this.


>I need to be able to find out the process that is listening on a
>particular TCP port.  Does anybody know an easy way to do this?  None of
>the standard commands(netstat -a, ndd /dev/tcp) give that information.  
>Does this info even get stored in the kernel?

-

7514 Flower Meadow Drive, San Diego, CA 92126-1044, USA
ICBM: 117d 9' 30" W, 33d 55' 45" N, 125m
 
 
 

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

Hi Linuxers,

I just got a new copy of gcc-2.4.5 and source code of the pl11.
After having done the installation of gcc-2.4.5, I realised that
I have an extra directory: /usr/lib/gcc-lib/i386-linux.
The question is whether I need to keep the old gcc stuff under
the i386-linux.  I really like to clean it up so as to save 5.1
meg disk space (another poor Linux user  ;-( ).

Your answer is very appreciated.  Please send answer directly
to my address or the corresponding interest parties to reduce
the network load.  Thank you in advance.

Wing



2. can not setup the sendmail & imap

3. Help - shared libs lib****.so.4 lib***.so.5

4. Netscape stops, resumes when trackball is moved

5. 1 * vxjcLnWdi-Compiling shared lib with native Sun compiler (cc, aka, CC)

6. Modem Help needed!

7. 1 * BgyKFFrNo-Compiling shared lib with native Sun compiler (cc, aka, CC)

8. Linux Frequently Asked Questions with Answers (Part 5 of 6)

9. 2 * tCTtngjxY-Compiling shared lib with native Sun compiler (cc, aka, CC)

10. Compiling shared lib with native Sun compiler (cc, aka, CC)

11. 1 * xuzIBiqvq-Compiling shared lib with native Sun compiler (cc, aka, CC)

12. 1 * NmepTvXvo-Compiling shared lib with native Sun compiler (cc, aka, CC)

13. 2 * QQLISpHcd-Compiling shared lib with native Sun compiler (cc, aka, CC)