This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Dynamic Library (shared libraries)
- From: "Brian Budge" <brian dot budge at gmail dot com>
- To: "Montenegro, Alejandro" <amontenegro at sandc dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 30 Mar 2006 13:01:58 -0800
- Subject: Re: Dynamic Library (shared libraries)
- References: <A6C6515B9A8A4640BCBD2A9DC4B7617E042C8845@MS23.chicago.sandc.ws>
It is definitely possible. Check out the -shared option.
Brian
On 3/30/06, Montenegro, Alejandro <amontenegro@sandc.com> wrote:
>
> HI,
> I was wondering if it is possible to generate dynamic libraries using
> GNU.
> I have a program that uses different functions from FORTRAN and from C (
> see the content of makefile below), and I would like not to have to
> recompile and build it every time I change one of the files ( in this
> particular case the file called SPIRITI.o).
> Is there any way I can create an executable and still be able to access
> "modified" functions without having to rebuild the entire project?
>
> Thanks
>
> Almonleo
>
> ************************************* makefile
> *********************************************
> CC=gcc
> FOR=g77
> OBJECTS =dimdef.o \
> newmods.o \
> comtac.o \
> fgnmod.o \
> usernl.o \
> analyt.o \
> devt69.o \
> usrfun.o \
> hopcod.o \
> user10.o \
> SPIRIT.o \
> CFLAGS = -DUNDERSCORE -O2
> FFLAGS = -O2
> IMAGE=tpbig.exe
> LIBRARY = tpbig.a dislin.a -luser32 -lgdi32 -lcomdlg32
> .f.o:
> $(FOR) -c $(FFLAGS) $<
> .c.o:
> $(CC) -c $(CFLAGS) $(INCFLAGS) $<
> $(IMAGE) : $(OBJECTS)
> $(FOR) -s -o $(IMAGE) $(OBJECTS) $(LIBRARY)
> ************************************************************************
> ********************************
>
>