I have a plot program that needs two library files. I have attempted to make
these files similar to the ones used on other unix computers. The problem is
that my library files are not recognized and the symbols cannot be found.
They are also an incorrect structure. How do I make library files with g95?
Any help will be appreciated. Thanks


In general, I use a makefile to create programs and these two library files.

The file in the directory nasadig-dir has a makefile. In the makefile I have
.SUFFIXES: .f .c .o
G95OPTS = -fzero -fstatic -fonetrip
LDOPTS =

OBJECTS = (a bunch of .o files)

.f.o:;g95 $ (G95OPTS) -c *<

libnasadig: $(OBJECTS)
     ar -csvr libnasadig.a $(OBJECTS)

clean: $(OBJECTS)
        rm $(OBJECTS)

This should create the library file libnasadig.a

The makefile for the ntran-dir has

.SUFFIXES: .f .c .o
G95OPTS = -fzero -fstatic -fonetrip
CCOPTS = 
.f.o:
        g95 $(G95OPTS) -c $<
.c.o:
        cc $(CCOPTS) -c $<

OBJECTS - fNTRAN.o cNTRAN.o

libntran:$ *(OBJECTS)
    ar csvr libntran.a 'lorder *.o | tsort'


clean: $(OBJECTS)
        rm $(OBJECTS

And the program makefile that uses these library files has the following
structure

.SUFFIXES: .f .c .o
G95OPTS = -fzero -fstatic -fonetrip
LDOPTS =

.f.o:
        g95 $(G95OPTS) -c $<

OBJECTS = (a bunch of .o files)

tpsplot:$(OBJECTS)
        g95 $(LDOPTS) -o tpsplot.a $(OBJECTS)  ../ntran-dir/libntran.a \
         ../nasadig-dir/libnasadig.a

clean:  $(OBJECTS) 
        rm $(OBJECTS)


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fink-beginners mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.beginners

Reply via email to