public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Shared libraries
@ 1999-12-30  6:56 Coleman Baker
  1999-12-31 22:24 ` Coleman Baker
  0 siblings, 1 reply; 7+ messages in thread
From: Coleman Baker @ 1999-12-30  6:56 UTC (permalink / raw)
  To: help-gcc

Currently, I'm trying to convert an archived library I've created for an
executable into a shared library that can be used by java native methods.
The archived library will require the -lqt and the -lstdc++ libraries to
create an executable.  Are these available as shared libraries?  Thanks
for any help

Coleman Baker
cbaker@netcom.com

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

* Shared libraries
  1999-12-30  6:56 Shared libraries Coleman Baker
@ 1999-12-31 22:24 ` Coleman Baker
  0 siblings, 0 replies; 7+ messages in thread
From: Coleman Baker @ 1999-12-31 22:24 UTC (permalink / raw)
  To: help-gcc

Currently, I'm trying to convert an archived library I've created for an
executable into a shared library that can be used by java native methods.
The archived library will require the -lqt and the -lstdc++ libraries to
create an executable.  Are these available as shared libraries?  Thanks
for any help

Coleman Baker
cbaker@netcom.com

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

* Re: Shared Libraries
  2000-07-08 16:16   ` David Snopek
  2000-07-08 16:26     ` Kayvan A. Sylvan
@ 2000-07-09  0:15     ` Martin v. Loewis
  1 sibling, 0 replies; 7+ messages in thread
From: Martin v. Loewis @ 2000-07-09  0:15 UTC (permalink / raw)
  To: xevol; +Cc: gcc-help

> I found the solution to the problem (or at least something that makes it
> go away) although I do not really understand it.  In all of my files I
> had "#pragma interface" in the header and "#pragma implementation" in
> the implementation.

I would personally recommend not to use those pragmas at all. Life is
simpler without them.

Regards,
Martin

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

* Re: Shared Libraries
  2000-07-08 16:16   ` David Snopek
@ 2000-07-08 16:26     ` Kayvan A. Sylvan
  2000-07-09  0:15     ` Martin v. Loewis
  1 sibling, 0 replies; 7+ messages in thread
From: Kayvan A. Sylvan @ 2000-07-08 16:26 UTC (permalink / raw)
  To: David Snopek; +Cc: Martin v. Loewis, gcc-help

On Sat, Jul 08, 2000 at 06:14:10PM -0500, David Snopek wrote:
> I found the solution to the problem (or at least something that makes it
> go away) although I do not really understand it.  In all of my files I
> had "#pragma interface" in the header and "#pragma implementation" in
> the implementation.  I had read in the man pages for g++ that if you
> don't give "#pragma implementation" a header name then it will use the
> files name except with the *.h extension, so I didn't supply one because
> all of my files are named in this fashion.  In the midst of trying
> completely random things, I put the header names in.  And now it works
> perfectly.  I don;t know why, but for now I do not care.  Thanks for
> trying to help!!

I would like to know why this happens too, since I've been bitten by this
behavior as well.

Note also: The problem will go away with use of ``-O'' optimization. If
you use gcc's ``-g'' flag by itself, though, the linking problem
shows up.

-- 
Kayvan A. Sylvan                   | Proud husband of      | Father to my kids:
Sylvan Associates, Inc.            | Laura Isabella Sylvan | Katherine Yelena
http://www.successlinks.com/kayvan | Reach your goals now! | Robin Gregory

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

* Re: Shared Libraries
  2000-07-08 15:02 ` Martin v. Loewis
@ 2000-07-08 16:16   ` David Snopek
  2000-07-08 16:26     ` Kayvan A. Sylvan
  2000-07-09  0:15     ` Martin v. Loewis
  0 siblings, 2 replies; 7+ messages in thread
From: David Snopek @ 2000-07-08 16:16 UTC (permalink / raw)
  To: Martin v. Loewis, gcc-help

I found the solution to the problem (or at least something that makes it
go away) although I do not really understand it.  In all of my files I
had "#pragma interface" in the header and "#pragma implementation" in
the implementation.  I had read in the man pages for g++ that if you
don't give "#pragma implementation" a header name then it will use the
files name except with the *.h extension, so I didn't supply one because
all of my files are named in this fashion.  In the midst of trying
completely random things, I put the header names in.  And now it works
perfectly.  I don;t know why, but for now I do not care.  Thanks for
trying to help!!

    - David Snopek

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

* Re: Shared Libraries
  2000-07-08 11:10 Shared Libraries David Snopek
@ 2000-07-08 15:02 ` Martin v. Loewis
  2000-07-08 16:16   ` David Snopek
  0 siblings, 1 reply; 7+ messages in thread
From: Martin v. Loewis @ 2000-07-08 15:02 UTC (permalink / raw)
  To: xevol; +Cc: gcc-help

>     undefined reference to class_name virtual table
>     undefined reference to class_name type_info function
>     undefined reference to class_name type_info node

I'd check whether the first virtual function of class_name is really
implemented.

Regards,
Martin

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

* Shared Libraries
@ 2000-07-08 11:10 David Snopek
  2000-07-08 15:02 ` Martin v. Loewis
  0 siblings, 1 reply; 7+ messages in thread
From: David Snopek @ 2000-07-08 11:10 UTC (permalink / raw)
  To: gcc-help

I have been working on a project that involves two shared libraries
being statically loaded by a binary file.  All the objects in the shared
library were compiled using the -fPIC and linked with -shared.  Then in
linking the binary, I just used the full path and name of the shared
libraries as argument.  As far as I know this is standard proceedure but
I am not sure because I picked it up from example.  Suddenly, three days
ago, I tryed to recompile all of my source including the libraries, and
when I got to linking the binary it gave me these three errors for every
class that is referenced in the shared libraries:
    undefined reference to class_name virtual table
    undefined reference to class_name type_info function
    undefined reference to class_name type_info node
The strangest part is that I didn't change anything in the shared
libraries, and made minimal changes to the binary (which I undid in
hopes of maybe getting it to work again).  I am using RedHat 6.1 on a
i386, all the source is in C++.  I would appreciate any help that any
one can provide!!

    - David Snopek


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

end of thread, other threads:[~2000-07-09  0:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-30  6:56 Shared libraries Coleman Baker
1999-12-31 22:24 ` Coleman Baker
2000-07-08 11:10 Shared Libraries David Snopek
2000-07-08 15:02 ` Martin v. Loewis
2000-07-08 16:16   ` David Snopek
2000-07-08 16:26     ` Kayvan A. Sylvan
2000-07-09  0:15     ` Martin v. Loewis

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