| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | Yes, hits=5.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <SNT129-W2E72156B2337B784EB72687E40@phx.gbl> |
| From: | bo yu <enviyub2 AT hotmail DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | How to compile Fortran 90 subroutine under CYGWIN |
| Date: | Fri, 21 May 2010 12:37:32 +0000 |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
Dear all,
I am using Windows XP and have installed cygwin, in which the g++ C++ compi=
ler are installed. I have programs written in c, Fortran 77 and Fortran 90.=
Now, I am trying to build in cygwin. When I type =91make all=92 in cygwin.=
The error message is
gcc =96c runslhg.f
gcc =96c intrface.f
make: *** No rule to make target =91Testfor90.o=92, needed by =91sloshDos=
=92. Stop
Both runslhg.f and intrface.f are written in Fortran 77. Testfor90.f90 is w=
ritten in Fortran 90.Does that mean I could build fortran 90 in cygwin? I w=
ould appreciate if someone give me a hint what should I look at. Thank you.
Here is the code of =91makefile=92
---------------------------------------------------------------------------=
-------------
#!/bin/make
SHELL =3D /bin/sh
CC =3D gcc
F77 =3D g77
STRIP =3D strip
STD_FLAGS =3D -O3 -Wall -pedantic -ansi
FFLAGS =3D
LD_FLAGS =3D -Wl,--stack,8000000
STD_DEF =3D -D_WINDOWS_ -D_GCC_
STD_INC =3D -I.
STD_LIB =3D -lg2c -L/usr/lib -lm
PRJ_NAME =3D sloshDos
TARGETS =3D $(PRJ_NAME)
CFLAGS =3D $(STD_FLAGS) $(STD_DEF) $(STD_INC)
############################
# FILES
############################
H_SOURCES =3D slosh2.h \
pack.h \
myassert.h \
myutil.h \
savellx.h \
complex.h \
clock.h \
tendian.h \
tio3.h
C_OBJECTS =3D slosh2.o \
pack.o \
myassert.o \
myutil.o \
savellx.o \
complex.o \
clock.o \
tendian.o \
tio3.o
F_OBJECTS =3D runslhg.o \
intrface.o \
Testfor90.o
C_MAIN =3D cstart.c
############################
# TARGETS
############################
all: $(TARGETS)
@echo ""
$(PRJ_NAME): $(C_OBJECTS) $(F_OBJECTS) $(C_MAIN) $(LIB_DEPENDS) $(H_SOURCES)
$(CC) $(C_MAIN) $(CFLAGS) $(LD_FLAGS) $(C_OBJECTS) $(F_OBJECTS) $(STD_LIB)=
-o $(PRJ_NAME)
$(STRIP) -s $(PRJ_NAME).exe
install:
cp *.exe ../../bin
clean:
rm -f *.o *.bak *.BAK
############################
# SUFFIXES
############################
.c.o : $(H_SOURCES)
$(CC) -c $(CFLAGS) $<
.f.o:
${F77} -c ${FFLAGS} $<
=20
---------------------------------------------------------------------------=
-----------------
Here is the code of =91Testfor90.f90=92
--------------------------------------------------
! Test For90
program Testfor90
implicit none
=20
REAL cdfmin
cdfmin=3D0.05;=20
write(*,*) 'cdfmin =3D ',cdfmin
=20
stop
end program Testfor90
=20=20=09=09=20=09=20=20=20=09=09=20=20
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=3DPID28326::T:WLMTAGL:O=
N:WL:en-US:WM_HMP:042010_3
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |