[net.micro.pc] Problem with LINK and PASCAL. Help n

pier@ur-univax.UUCP (08/12/85)

 
Our site here has been cut off from news for over two weeks and therefore
lost quite a bit of notes. As I did not get any response to a problem I posted
just before we got cut off, I am reposting it and hope to get help. Sorry for
those who have seen it already.

I am trying to port a program from a VAX to an AT. The program is composed of
several modules written in PASCAL and FORTRAN, with the main module in PASCAL.
I have been able to compile all modules OK using IBM PASCAL 1.0 and IBM FORTRAN
2.0.

The problem occurs at the LINK. I get the following error several hundred (yes
indeed) tines:
Fixup offset exceeds field width in "name of module".OBJ near "address"

I get this error for all modules, every 5 or 10 bytes.
Appendix A on error messages in the DOS manual (DOS 3.0) says:
an assembler instruction refers to an address with a NEAR attribute instead
of a FAR attribute.

Since I am not using assembler, it must be something with the compiler.
I checked to make sure that the parameters passed to a procedure in a different
module are passed VARS and not VAR, so that the segment gets passed along with
the offset. Still no luck.

I tried to link each module separately. Besides the unresolved externals, I
don't get any error except for the main module.
So I get that "Fixup offset" error even when I link the main module alone.
That main module is the biggest and the PASCAL compiler generates a .OBJ file
bigger than 64K. Is that where the problem lies? Is the compiler generating
the wrong code? The problem does not lie in interfacing PASCAL and FORTRAN
since I get the error when linking the main PASCAL module alone.

Has anybody experienced this problem? Any ideas of what the problem is and maybe
how to fix it? Even if you only guess what it can be, let me know what you
think. I badly need help.



Pierre Darmon
University of ochester

{allegra|decvax|seismo}!rochester!ur-univax!pier

bc@cyb-eng.UUCP (Bill Crews) (08/13/85)

> I am trying to port a program from a VAX to an AT. The program is composed of
> several modules written in PASCAL and FORTRAN, with the main module in PASCAL.
> I have been able to compile all modules OK using IBM PASCAL 1.0 and IBM
> FORTRAN 2.0.
> 
> The problem occurs at the LINK. I get the following error several hundred (yes
> indeed) tines:
> Fixup offset exceeds field width in "name of module".OBJ near "address"

IBM Pascal has the (nonstandard) capability of passing long or short parameters
as var procedure arguments.  It's been a few years, but I believe you need
to declare all var args as "vars" instead of "var", because FORTRAN assumes
long pointers always.  This could very likely be your problem.
-- 
  /  \    Bill Crews
 ( bc )   Cyb Systems, Inc
  \__/    Austin, Texas

[ gatech | ihnp4 | nbires | seismo | ucb-vax ] ! ut-sally ! cyb-eng ! bc

pier@ur-univax.UUCP (08/13/85)

As I have pointed out myself in my posting the problem is not in interfacing
PASCAL and FORTRAN since I get that error message by linking a PASCAL 
module alone.


Pierre Darmon
Uiversity of Rochester