Dec 232017
 
Microsoft Fortran patch to correct L2029 error in mixed language Windows programming with Fortran and C.
File HF0484.ZIP from The Programmer’s Corner in
Category Miscellaneous Language Source Code
Microsoft Fortran patch to correct L2029 error in mixed language Windows programming with Fortran and C.
File Name File Size Zip Size Zip Type
HF0484.DOC 3299 1328 deflated
HMAP.OBJ 63 55 deflated
WHALLOC.OBJ 702 607 deflated
WHSEG.OBJ 633 491 deflated

Download File HF0484.ZIP Here

Contents of the HF0484.DOC file


======================================================================
Microsoft Product Support Services Application Note (Text File)
HF0484: PATCH: ALLOCATE IN MIXED-LANGUAGE WINDOWS PROGRAMMING
======================================================================
Revision Date: 11/91
Disk Included

The following information applies to FORTRAN version 5.1.

--------------------------------------------------------------------
| INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY |
| ACCOMPANY THIS DOCUMENT (collectively referred to as an |
| Application Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY |
| KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO |
| THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A |
| PARTICULAR PURPOSE. The user assumes the entire risk as to the |
| accuracy and the use of this Application Note. This Application |
| Note may be copied and distributed subject to the following |
| conditions: 1) All text must be copied without modification and |
| all pages must be included; 2) If software is included, all files |
| on the disk(s) must be copied without modification [the MS-DOS(R) |
| utility DISKCOPY is appropriate for this purpose]; 3) All |
| components of this Application Note must be distributed together; |
| and 4) This Application Note may not be distributed for profit. |
| |
| Copyright 1991 Microsoft Corporation. All Rights Reserved. |
| Microsoft, MS-DOS, and the Microsoft logo are registered |
| trademarks and Windows is a trademark of Microsoft Corporation. |
--------------------------------------------------------------------

This application note corrects a problem that occurs when you link a
mixed-language Windows program using FORTRAN and C. If the FORTRAN
code uses the ALLOCATE statement, LINK generates two errors:

LINK : error L2029: Unresolved external: _hfree
LINK : error L2029: Unresolved external: _hmalloc

The errors are caused by the absence of several routines in the C-
compatible FORTRAN run-time library. To correct this problem, you must
add to the C-compatible FORTRAN run-time library the three object
modules that are included on the enclosed HF0484 disk.

Modifying the C-Compatible FORTRAN Run-Time Library
---------------------------------------------------

To make the correction to the C-compatible FORTRAN run-time library,
copy the following three object modules from the enclosed HF0484 disk
to the directory where your FORTRAN library is located:

WHALLOC.OBJ
WHSEG.OBJ
HMAP.OBJ

Then, enter the following command

LIB + WHALLOC.OBJ + WHSEG.OBJ + HMAP.OBJ;

where represents the name of the C-compatible FORTRAN
run-time library you want to modify. You can then delete the three
object modules from the library directory. The library manager will
make a backup file named . When the new library has been
tested successfully, you can also delete this backup file.




 December 23, 2017  Add comments

Leave a Reply