delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/12/14:45:41

From: "Alexei A. Frounze" <alex DOT fru AT mtu-net DOT ru>
Newsgroups: comp.os.msdos.djgpp
Subject: OT: RHIDE and G77 (FORTRAN 77)
Date: Fri, 12 May 2000 21:48:12 +0400
Organization: MTU-Intel ISP
Lines: 56
Message-ID: <391C43DC.70CAD047@mtu-net.ru>
NNTP-Posting-Host: ppp102-190.dialup.mtu-net.ru
Mime-Version: 1.0
X-Trace: gavrilo.mtu.ru 958157323 31641 212.188.102.190 (12 May 2000 18:48:43 GMT)
X-Complaints-To: usenet-abuse AT mtu DOT ru
NNTP-Posting-Date: 12 May 2000 18:48:43 GMT
X-Mailer: Mozilla 4.72 [en] (Win95; I)
X-Accept-Language: ru,en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi guys!

I just downloaded g772952b.zip package (Fortran 77) from FTP. I need Fortran
for my diploma.

When I try to compile the following program from the command line:

---------8<---------
        PROGRAM EXAMPLE1

        PRINT *, 'HELLO WORLD!!!'

        END
---------8<---------

typing "g77 -o hw.exe hw.for" everything works okay and I get hw.exe that
prints standard "hello world" message.

When I make a project in the RHIDE, include this file to the project and try
to compile it, I get the following messages:

------------------8<-------------------
gcc   -o hw.exe  hw.o     -lm -lf2c
d:/djgpp/bin/ld.exe: cannot find -lf2c
collect2: ld returned 1 exit status
make.exe: *** [hw.exe] Error 1
------------------8<-------------------
RHIDE puts the "RHIDE_TYPED_LIBS.f=m f2c" line to the make file.

If I change that line to "RHIDE_TYPED_LIBS.f=m" and run make, I get the
following messages:
------------------8<-------------------
g77   -g -O       -c hw.for -o hw.o
gcc   -o hw.exe  hw.o     -lm
d:/djgpp/lib/crt0.o(.data+0xc2):crt0.s: undefined reference to `main'
hw.o: In function `MAIN__':
hw.for:3: undefined reference to `s_wsle'
hw.for(.text+0x3d): undefined reference to `do_lio'
hw.for(.text+0x45): undefined reference to `e_wsle'
hw.for:5: undefined reference to `s_stop'
d:/djgpp/lib/libc.a(crt1.o)(.text+0x44e):crt1.c: undefined reference to
`main'
collect2: ld returned 1 exit status
make.exe: *** [hw.exe] Error 1
------------------8<-------------------

What's wrong? How can I setup my DJGPP and RHIDE so that it could work fine
just like that "g77 -o hw.exe hw.for" command line?

Thanks.
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror:   http://members.xoom.com/alexfru


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019