LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-17-2006, 11:21 AM   #1
TheBrick
Member
 
Registered: Mar 2006
Location: London
Distribution: SUSE 10.0 Home soon to go (no internet conection), gentoo laptop, slack on development box
Posts: 81

Rep: Reputation: 15
Make Trouble linking some fortran code Make file problem? any ideas?


Hello all,

I am working on a machine with slackwear linux and gcc 3.4.6. I have been modifying and writing some fortran programs some written in f77 and others in f90. The computer did not have gfortran installed so I installed gcc 4.1 with the suffix -4.1 in my home directory. My program is written in f77 but a small amount of code (but enough that it is more than I really want to rewrite) that I have inherated is in f90. I thought if I compiled each part seperatly and then linked I should have a working program however I have some error that I do not understand. Please note I am NOT a programming master it may be very simple. Here is my output and make file below.


# Makefile for seedboxes code

FXX = g77
FXX2 = gfortran-4.1
FLAGS = -O
UFLAGS = -c
LIBPATH = -Wl,-rpath=/home/tommy/.kde/bin/gcc41/lib

#%.o: %.f
# $(FXX) $(UFLAGS) $<

SEEDBOXES: seedboxes.o tommysroutiens.o AZ_random_sub.o JFB_random_lowdensity_sub.o JFB_random_highdensity_sub.o
$(FXX2) $(FLAGS) $(LIBPATH) seedboxes.o tommysroutiens.o AZ_random_sub.o JFB_random_lowdensity_sub.o JFB_random_highdensity_sub.o -o SEEDBOXES.out
seedboxes.o: seedboxes.f tommysroutiens.f AZ_random_sub.f JFB_random_lowdensity_sub.f JFB_random_highdensity_sub.f
$(FXX) $(UFLAGS) seedboxes.f tommysroutiens.f AZ_random_sub.f JFB_random_lowdensity_sub.f
$(FXX2) $(UFLAGS) $(LIBPATH) JFB_random_highdensity_sub.f
tommysroutiens.o: tommysroutiens.f
$(FXX) $(UFLAGS) tommysroutiens.f
AZ_random_sub.o: AZ_random_sub.f
$(FXX) $(UFLAGS) AZ_random_sub.f
JFB_random_lowdensity_sub.o: JFB_random_lowdensity_sub.f
$(FXX) $(UFLAGS) JFB_random_lowdensity_sub.f
JFB_random_highdensity_sub.o: JFB_random_highdensity_sub.f
$(FXX2) $(UFLAGS) JFB_random_highdensity_sub.f



clean:
rm -f *.o *~


g77 -c seedboxes.f tommysroutiens.f AZ_random_sub.f JFB_random_lowdensity_sub.f
gfortran-4.1 -c -Wl,-rpath=/home/tommy/.kde/bin/gcc41/lib JFB_random_highdensity_sub.f
gfortran-4.1 -O -Wl,-rpath=/home/tommy/.kde/bin/gcc41/lib seedboxes.o tommysroutiens.o AZ_random_sub.o JFB_random_lowdensity_sub.o JFB_random_highdensity_sub.o -o SEEDBOXES.out
seedboxes.o(.text+0x125): In function `MAIN__':
: undefined reference to `s_copy'
seedboxes.o(.text+0x13d): In function `MAIN__':
: undefined reference to `s_cmp'
.
.
.
.
.
.
.
JFB_random_lowdensity_sub.o(.text+0xba2): In function `insert_':
: undefined reference to `e_wsle'
collect2: ld returned 1 exit status
make: *** [SEEDBOXES] Error 1




I can supply the compleate output if it would help but it is .more of the same. Please be nice many Thanks.

T
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C Fortran linking problem hhegab Fedora 2 12-06-2005 06:16 PM
C-Fortran linking problem hhegab Fedora 0 09-24-2005 03:03 AM
in linux fortran: problem with the command "make" terrence Programming 2 08-27-2005 04:02 AM
Trying to make mod_ssl work - virtualhosts make trouble Belize Linux - Software 0 02-26-2005 08:30 PM
make dep,make clean,make bzImage problem Babba Linux - Newbie 2 01-08-2003 03:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration