SuSE 6.2, f2c and gcc 
Author Message
 SuSE 6.2, f2c and gcc

Hi all

  Here is problem for you (a problem
  for me for sure!):

  I have F77 sources (*.for) from a Mainframe
  version of an econometric
  software called Limdep that I am using at
  work on a Sun station.  I want to
  install it at home on a Linux box running
  SuSE 6.2.

  First step, the original fortran sources
  *.for are not fully compatible with
  the glibc2.1 of SUSE 6.2.  I gotta change my
  *.for sources into *.f, which I
  then compile with f2c.  I found that on
  Scientific Applications on Linux web
  site:
  http://www.*-*-*.com/

  The package f2c is installed on my system.
  Following the USER's guide, some
  modifications to *.f concerning bad
  declarations on
  some COMMON BLOCKs are made.  f2c is running
  without any error messages.
  Fine

  Second Step: here is the problem, because I
  am notn a expert in the C/F77
  question....  The f2c *.f  produces the
  corresponding *.c...
  I try to compile these *.c with gcc:

  bash-2.03# gcc *.c
  /tmp/ccEy8ffD.o: warning: common of `inpt_'
  overridden by definition
  /tmp/ccNNqE8i.o: warning: defined here
  /tmp/ccEy8ffD.o: warning: common of
  `outbuf_' overridden by definition
  /tmp/ccNNqE8i.o: warning: defined here
  /tmp/ccEy8ffD.o: warning: common of
  `rdbufr_' overridden by definition
  /tmp/ccNNqE8i.o: warning: defined here
  ...
  /tmp/ccUY9QEH.o(.text+0x3587): undefined
  reference to `log'
  /tmp/ccUY9QEH.o(.text+0x381b): undefined
  reference to `d_sign'
  /tmp/ccUY9QEH.o(.text+0x3835): undefined
  reference to `exp'
  /tmp/ccUY9QEH.o(.text+0x3887): undefined
  reference to `log'
  /tmp/ccUY9QEH.o(.text+0x3b0b): undefined
  reference to `d_sign'
  /tmp/ccUY9QEH.o(.text+0x3b25): undefined
  reference to `exp'
  /tmp/ccUY9QEH.o(.text+0x3b77): undefined
  reference to `log'
  /tmp/ccUY9QEH.o(.text+0x3dcb): undefined
  reference to `d_sign'

  and so on for a while...

  I also tried with gcc -c *.c.... It basicaly
  does the same thing, except
  that it produces *.o... (I know that is
  normal...)  I then try to gcc
  *.o..... Same thing as gcc *.c

  I am really not an expert in C/F77, but do
  you think that this matter could
  be solved?  Is there anything I am doing
  wrong?  Is it the gcc -option that
  I am not using correctly?

  Any suggestions would be appreciated.

  Regards

  NB

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 SuSE 6.2, f2c and gcc

Quote:
>undefined
>  reference to

....

You'd save yourself some hassles if you'd use g77.  If you want to use f2c
without knowing about libraries, you need the driver script which should be
available for your system, variously known as f77, fc, fort77.  You are
skipping the linking of the libf2c library and the libm.  
Tim Prince



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. System3 2.3.6 on SuSE 6.2

2. Oberon on SuSE Linux 6.2

3. F on Linux SuSE 6.2

4. Bug: whichdb.py of python 1.5.2 at suse linux 6.2

5. 5.2.1 fails 5 tests: SGI Indigo-2 IRIX 6.2 gcc -O2

6. f2c problem with suse linux 4.2

7. gnat, gvd, gdb, gcc and suse linux 8.2

8. Help: f2c+gcc for DOS

9. cmd_line args how ? (f2c,gcc)

10. problem compiling f77 with f2c or gcc on redhat 7.0

11. poor performance of f2c + gcc on BSD/OS 2.0

12. f2c+gcc in DOS (djgpp)

 

 
Powered by phpBB® Forum Software