Hello:
Listed below is the output from a very simple BATCH file to compile, library
and link 2 Fortran files (these files do nothing but exist). I have never used
GNU "programs" before (just IBM, DEC and Microsoft). I now have the
"opportunity" to use these programs (yes I need to use G77). Is it possible for
someone to explain why LD.EXE can not link. Thanks.
ie: I have tried multiple file extensions (.f, .for, .obj, .o, .a, .out, .exe) and
nothing seems to matter.
Screen Output:
TEST.BAT INFO: (Windows 7 Pro SP1)
Microsoft Windows [Version 6.1.7601]
CD...............:C:\ABC
PROGRAM_NAME.....:ABC
SUBROUTINE.......EF
COMP_IMAGE.......:C:\ABC\BIN\G77.EXE
LIB_IMAGE........:C:\ABC\BIN\AR.EXE
LINK_IMAGE.......:C:\ABC\BIN\LD.EXE
FORTRAN_EXT......:FOR
OBJECT_EXT.......:OBJ
LIBRARY_EXT......:LIB
LIBRARY_PATH.....:C:\ABC
LINK_EXT.........:EXE
*** GNU VERSION INFO ***
g77 version 2.95 19990728 (release) (from FSF-g77 version 0.5.25 19990728
(release))
Driving: C:\ABC\BIN\G77.EXE -v -c -xf77-version /dev/null -xnone
G77.EXE: /dev/null: No such file or directory
Using builtin specs.
gcc version 2.95 19990728 (release)
GNU ar 2.9.4
Copyright 1997, 1998 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
GNU ld version 2.9.4 (with BFD 2.9.4)
Supported emulations:
i386pe
. Press ENTER to Continue:
*** DIR OF FORTRAN FILES ***
ABC.FOR
DEF.FOR
. Press ENTER to COMPILE:
*** COMPILE ***
C:\ABC>C:\ABC\BIN\G77.EXE -c -o ABC.OBJ ABC.FOR
C:\ABC>C:\ABC\BIN\G77.EXE -c -o DEF.OBJ DEF.FOR
DIR OF OBJECT FILES
ABC.OBJ
DEF.OBJ
. Press ENTER to LIBRARY:
*** LIBRARY ***
C:\ABC>C:\ABC\BIN\AR.EXE r ABC.LIB DEF.OBJ
DIR OF LIBRARY FILES
ABC.LIB
LIBRARY LISTING
C:\ABC>C:\ABC\BIN\AR.EXE t ABC.LIB
DEF.OBJ
. Press ENTER to LINK:
*** LINK ***
C:\ABC>C:\ABC\BIN\LD.EXE -o ABC.EXE -l ABC.LIB ABC.OBJ
C:\ABC\BIN\LD.EXE: cannot open -lABC.LIB: No such file or directory
C:\ABC>C:\ABC\BIN\LD.EXE -o ABC.EXE -L C:\ABC -l ABC.LIB ABC.OBJ
C:\ABC\BIN\LD.EXE: cannot open -lABC.LIB: No such file or directory
. Press ENTER to EXIT:
C:\ABC>
Listed below is the output from a very simple BATCH file to compile, library
and link 2 Fortran files (these files do nothing but exist). I have never used
GNU "programs" before (just IBM, DEC and Microsoft). I now have the
"opportunity" to use these programs (yes I need to use G77). Is it possible for
someone to explain why LD.EXE can not link. Thanks.
ie: I have tried multiple file extensions (.f, .for, .obj, .o, .a, .out, .exe) and
nothing seems to matter.
Screen Output:
TEST.BAT INFO: (Windows 7 Pro SP1)
Microsoft Windows [Version 6.1.7601]
CD...............:C:\ABC
PROGRAM_NAME.....:ABC
SUBROUTINE.......EF
COMP_IMAGE.......:C:\ABC\BIN\G77.EXE
LIB_IMAGE........:C:\ABC\BIN\AR.EXE
LINK_IMAGE.......:C:\ABC\BIN\LD.EXE
FORTRAN_EXT......:FOR
OBJECT_EXT.......:OBJ
LIBRARY_EXT......:LIB
LIBRARY_PATH.....:C:\ABC
LINK_EXT.........:EXE
*** GNU VERSION INFO ***
g77 version 2.95 19990728 (release) (from FSF-g77 version 0.5.25 19990728
(release))
Driving: C:\ABC\BIN\G77.EXE -v -c -xf77-version /dev/null -xnone
G77.EXE: /dev/null: No such file or directory
Using builtin specs.
gcc version 2.95 19990728 (release)
GNU ar 2.9.4
Copyright 1997, 1998 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
GNU ld version 2.9.4 (with BFD 2.9.4)
Supported emulations:
i386pe
. Press ENTER to Continue:
*** DIR OF FORTRAN FILES ***
ABC.FOR
DEF.FOR
. Press ENTER to COMPILE:
*** COMPILE ***
C:\ABC>C:\ABC\BIN\G77.EXE -c -o ABC.OBJ ABC.FOR
C:\ABC>C:\ABC\BIN\G77.EXE -c -o DEF.OBJ DEF.FOR
DIR OF OBJECT FILES
ABC.OBJ
DEF.OBJ
. Press ENTER to LIBRARY:
*** LIBRARY ***
C:\ABC>C:\ABC\BIN\AR.EXE r ABC.LIB DEF.OBJ
DIR OF LIBRARY FILES
ABC.LIB
LIBRARY LISTING
C:\ABC>C:\ABC\BIN\AR.EXE t ABC.LIB
DEF.OBJ
. Press ENTER to LINK:
*** LINK ***
C:\ABC>C:\ABC\BIN\LD.EXE -o ABC.EXE -l ABC.LIB ABC.OBJ
C:\ABC\BIN\LD.EXE: cannot open -lABC.LIB: No such file or directory
C:\ABC>C:\ABC\BIN\LD.EXE -o ABC.EXE -L C:\ABC -l ABC.LIB ABC.OBJ
C:\ABC\BIN\LD.EXE: cannot open -lABC.LIB: No such file or directory
. Press ENTER to EXIT:
C:\ABC>