[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

foreign function blues



I am having a problem, of course, with the foreign function interface
in MCL.  I am using ThinkC object file converted with ThinkPascal
to a MPW compatable object file.  This works some of the time, but
at other times MCL will complain (during a ff-load) about a
"Reference to an undefined entry point ...".  

    What makes me think that this is a MCL problem is that the MPW
command dumpobj correctly identifies the entrypoints in my object
file (although it lists the problematic name in the dictionary,
and calls it a 'reference'...)

   For instance, I have some C code that does a 'mod', and this 
generates the MCL error

> Error: Reference to undefined entry point "_C_LMODS"
> While executing: ccl::ff-mark-entry


The output to the MPW dumpobj on the file is:


>Dump of file pastest.lib
>
>First:      Kind 1 Version 2
>
>Dictionary: FirstId 1
>      1: Main
>Pad         
>
>Dictionary: FirstId 2
>      2: WINDRAW
>      3: _C_LDIVS
>      4: _C_LMODS
>      5: MYTHANG
>      6: DIGITVAL
>      7: MYTHANGER
>Pad         
>
>Module:              Flags $01 ModuleId  8 Size 102
>Content:             Flags $09 Contents size = 102
>
>Module:              Flags $08 ModuleId DIGITVAL SegmentId Main
>Content:             Flags $08 Contents size = 434
>EntryPoint:          Flags $08 Offset $0028 EntryId MYTHANG
>EntryPoint:          Flags $08 Offset $00D6 EntryId MYTHANGER
>EntryPoint:          Flags $08 Offset $0180 EntryId WINDRAW
>Reference:           Flags $90 RefId  8 Short Offsets
>                      0056
>Reference:           Flags $90 RefId  8 Short Offsets
>                      007E
>Reference:           Flags $90 RefId  8 Short Offsets
>                      008C
>Reference:           Flags $90 RefId  8 Short Offsets
>                      009C
>Reference:           Flags $90 RefId  8 Short Offsets
>                      00AC
>Reference:           Flags $90 RefId  8 Short Offsets
>                      00B4
>Reference:           Flags $90 RefId  8 Short Offsets
>                      0102
>Reference:           Flags $10 RefId _C_LMODS Short Offsets
>                      0140
>Reference:           Flags $10 RefId _C_LDIVS Short Offsets
>                      0158
>
>Last        
>End of file pastest.lib



Thanks for any pointers you can give me to workarounds.

------------------------
Nathaniel Titterton
nate@garnet.berkeley.edu