public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiling libraries
@ 2004-12-17 11:42 Craig Phillips
  0 siblings, 0 replies; 2+ messages in thread
From: Craig Phillips @ 2004-12-17 11:42 UTC (permalink / raw)
  To: gcc-help

Hi,

What amendments should i make to the Makefile CFLAGS in order to get it to link
the objects into a library .so?  I have modified a program so it can be loaded
dynamically as a library but am having trouble determining what to amend in the
Makefile.

Cheers
Craig


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

* RE: Compiling libraries
@ 2004-12-17 17:22 lrtaylor
  0 siblings, 0 replies; 2+ messages in thread
From: lrtaylor @ 2004-12-17 17:22 UTC (permalink / raw)
  To: caph, gcc-help

That can depend on what platform your running on and which version of
GCC you're using.  You also probably don't what to change CFLAGS.
Usually LDFLAGS is used for specifying linking options.  However,
generally, the most common options to use for creating a shared library
are '-G' and '-shared'.  Try -G first.  If that doesn't work.  Try
'-shared'.  Don't use both at the same time. 

Good luck,
Lyle


-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Craig Phillips
Sent: Friday, December 17, 2004 4:42 AM
To: gcc-help@gcc.gnu.org
Subject: Compiling libraries

Hi,

What amendments should i make to the Makefile CFLAGS in order to get it
to link
the objects into a library .so?  I have modified a program so it can be
loaded
dynamically as a library but am having trouble determining what to amend
in the
Makefile.

Cheers
Craig




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

end of thread, other threads:[~2004-12-17 17:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-17 11:42 Compiling libraries Craig Phillips
2004-12-17 17:22 lrtaylor

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