Re: GETARG in ifc

From: Andrew Grief (grief_at_maths.ox.ac.uk)
Date: 08/20/04


Date: Fri, 20 Aug 2004 16:01:09 +0100


> On Fri, 20 Aug 2004 12:39:30 GMT, tholen@antispam.ham wrote:
>
> >That is all well and good, but not being in the office right now and
> >unable to try it for myself, I'm wondering if folks know for a fact
> >that -Vaxlib includes the GETARG routine, or whether it was merely
> >something worth trying.
>

Hi tholen@antispam.ham

It does seem to work for me (YMMV). Here's the code, compile line and
output. If you give me (by email reply to this address) an email
address I will forward relevant excerpts from the ifc7.1 documentation to
you, but I'm reluctant to post them to the group. There's nothing very
exciting in the docs for this anyway though.

My test code and output:

program t
character(20) :: output
call getarg(0,output) !This should return code name.
print*, output
call getarg(1,output) !This should return first argument.
print*, output
end program t

bash$ ifc -V
Intel(R) Fortran Compiler for 32-bit applications, Version 7.1

bash$ ifc t.f90 -Vaxlib
   program T

14 Lines Compiled
bash$ ./a.out 123
 ./a.out
 123
bash$

I hope that helps you.

Yours,
Andy

PS: There was a debate about capital 'V' for Vaxlib... Yes it is required,
and I do get a warning if it's ommited - see below. By the way, for
Windows, the documentation suggests the -Vaxlib should be replaced by the
/4Yportlib switch, but I don't use Windows.

bash$ ifc t.f90 -vaxlib
ifc: Command line warning: ignoring option '-v'; no argument required
   program T

14 Lines Compiled
/tmp/ifcNmTVkg.o: In function `main':
/tmp/ifcNmTVkg.o(.text+0x25): undefined reference to `getarg_'
/tmp/ifcNmTVkg.o(.text+0x61): undefined reference to `getarg_'
bash$



Relevant Pages

  • Re: ANNOUNCE: SoX for DOS
    ... I had no bash etc. You are ... A number of unix programs which are set up for the ... automake/autoconfigure mechanism compile with minor fixes under DJGPP, ... Doug Kaufman ...
    (comp.os.msdos.djgpp)
  • Re: Help!
    ... When the average user wants to compile ... Seriously, the standard man page format wasn't designed for mass usage, ... Of course some commands (like bash) are really not ...
    (Debian-User)
  • [SLE] Kernel Compile v2.4.20-SuSE-100
    ... I'm not sure that I've got the kernel version completely right, ... I compile the kernel and put it in /boot/ as bzImage.Olipro, ... bash#: make mrproper ... That's it then I move my bzImage to /boot/ and add an entry to GRUB. ...
    (SuSE)
  • glibc symbol versioning
    ... Suppose I've got glibc-2.3.4 installed on my system, and I compile ... Bash uses some function that has version GLIBC_2.3.4, ... pgavin at gmail dot com ...
    (comp.os.linux.development.system)
  • Problem to call fortran from C with linux ifc/gcc
    ... I tried without succes to call a Fortran subroutine with a C program in ... ifc -c -nus mod_fortran.f90 ... undefined reference to `fct_fortran' ... Someone has an idea to compile my program? ...
    (comp.lang.fortran)