public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem distributing shared libraries for different distributions for Linux
@ 2003-04-13 21:16 Jaap Haitsma
  2003-04-13 21:46 ` Oscar Fuentes
  0 siblings, 1 reply; 2+ messages in thread
From: Jaap Haitsma @ 2003-04-13 21:16 UTC (permalink / raw)
  To: gcc-help

Hi,

I'm currently working on a project where we intend to
distribute a shared library in binary form, which
users then can use to develop there own application.

The shared library we write in C++
The shared library it self is has a couple of threads
and does some socket communcation

We are having problems getting this to work under
different Linux distributions and even different
versions of the same distribution. We're compiling
everything under Redhat Linux 7.1 with gcc 2.95.3
If we then for example  write and compile an
application on Redhat 7.1 or 7.3 (On Redhat 7.3 gcc
2.96 is installed, I know it's not an official gcc
version) and link with the shared library we created 
everything works. But if we compile the same code on
redhat 8.0 with gcc 3.2 the program even fails to
link.
The linker is complaining about undefined references
to   a number of static functions inside a C++ class 
we use.

If I check with "nm", the symbols for the static
functions are present in the shared library but the
linker keeps complaining about this.

Anyone has an idea why this doesn't work? 

On other distro's such as Debian and SuSe we also run
into problems such as undefined references.

Recompiling the code for the shared library on each
platform works, but is really a pain to do.

Anybody out there has an idea what we could do to only
compile on one distribution and then run it on
multiple distributions.


thanks

Jaap

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

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

* Re: Problem distributing shared libraries for different distributions for Linux
  2003-04-13 21:16 Problem distributing shared libraries for different distributions for Linux Jaap Haitsma
@ 2003-04-13 21:46 ` Oscar Fuentes
  0 siblings, 0 replies; 2+ messages in thread
From: Oscar Fuentes @ 2003-04-13 21:46 UTC (permalink / raw)
  To: gcc-help

Jaap Haitsma <jaap_haitsma@yahoo.com> writes:

[snip]

> The shared library we write in C++
> The shared library it self is has a couple of threads
> and does some socket communcation
>
> We are having problems getting this to work under
> different Linux distributions and even different
> versions of the same distribution. We're compiling
> everything under Redhat Linux 7.1 with gcc 2.95.3
> If we then for example  write and compile an
> application on Redhat 7.1 or 7.3 (On Redhat 7.3 gcc
> 2.96 is installed, I know it's not an official gcc
> version) and link with the shared library we created 
> everything works. But if we compile the same code on
> redhat 8.0 with gcc 3.2 the program even fails to
> link.
> The linker is complaining about undefined references
> to   a number of static functions inside a C++ class 
> we use.

The C++ ABI changed with gcc 3.x. This means you can not mix C++ code
compiled with gcc 3.x with older C++ binaries.

[snip]

-- 
Oscar

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

end of thread, other threads:[~2003-04-13 21:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-13 21:16 Problem distributing shared libraries for different distributions for Linux Jaap Haitsma
2003-04-13 21:46 ` Oscar Fuentes

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).