PRB: Compilation Errors--$FREEFORM & Graphics Subroutine Calls

Last reviewed: July 18, 1995
Article ID: Q50595
The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS and OS/2, versions 5.0, 5.1

SYMPTOMS

An attempt to compile an application that uses the $FREEFORM metacommand and calls the FORTRAN graphics run-time library fails.

CAUSE

The FGRAPH.FD and FGRAPH.FI files do not conform to the $FREEFORM format.

RESOLUTION

If you must use the $FREEFORM metacommand, you must modify the FGRAPH.FD and FGRAPH.FI files. We recommend that you create customized include files that contain only the information that pertains to the graphics routines your application calls.

MORE INFORMATION

The following code example uses the $FREEFORM metacommand and calls a subroutine in the FORTRAN graphics library.

Sample Code

C Compile options needed: None

      $FREEFORM
      include 'OHMAN.FI'
      subroutine mysub()
      include 'OHMAN.FD'
      call setlinestyle(#AA3C)
      end

For this particular example, the OHMAN.FI file contains the subset of FGRAPH.FI that pertains to the setlinestyle subroutine. OHMAN.FI is as follows:

INTERFACE TO SUBROUTINE setlinestyle[FAR,C,ALIAS:"__setlinestyle"] (mask) INTEGER*2 mask END

Likewise, the OHMAN.FD file contains the subset of FGRAPH.FD that pertains to the setlinestyle subroutine. OHMAN.FD is as follows:

      EXTERNAL setlinestyle


Additional reference words: 5.00 5.10
KBCategory: kbprg kbprb
KBSubcategory: FORTLngIss


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 18, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.