[fpc-pascal] Minimal Sylpheed plugin in FreePascal
Jonas Maebe
jonas.maebe at elis.ugent.be
Tue May 17 21:39:59 CEST 2011
On 17 May 2011, at 21:35, Anton Shepelev wrote:
> I have tried to create a Windows plugin dll for the Sylpheed
> e-mail client in FreePascal but couldn't get past a strange
> side effect: the mere fact of the plugin being loaded makes
> GTK's window-showing functions crash the whole program.
One likely potential cause is the fact that released FPC versions enable all floating point exceptions. Since libc does not do that, many C programs and frameworks contain invalid floating point operations.
You can try adding the following to your dll:
uses
math;
...
initialization
SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision])
end.
Of course, this means that you won't get such exceptions in Pascal code either anymore.
More information about the fpc-pascal
mailing list