[fpc-pascal] exports VS export
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue Jan 18 21:08:24 CET 2011
On 18 Jan 2011, at 20:46, Alex Shishkin wrote:
> 18.01.2011 22:28, Jonas Maebe пишет:
>> What do you mean by "crashes"? A segmentation fault? If so, where exactly does it crash? And how do you import that routine in the program and call it? Currently, the "export" modifier apparently does not add an alias for the unmangled name, so I'm not sure how you are even getting things linked successfully.
>>
> Attempt to run with static linking crashes debugger.
You posted the source to a library. It is not possible to run a library. So again: what is the program that you wrote that imports that routine and how did you import that routine in that program?
Additionally, afaik FPC does not currently support creating statically linkable libraries. So how did you statically link a compilation unit that starts with the "library" keyword into a program?
> Dynamic linking simply failed
What is the error that you got?
> So I ask what does modifier "export" actually do?
a) it makes the routine's symbol public, so that it can be referenced from other object files
b) for the OS/2 and EMX targets, it also adds the routine to the "deffile" (I don't know the details about that)
Jonas
More information about the fpc-pascal
mailing list