[fpc-pascal] Minimal Sylpheed plugin in FreePascal

Anton Shepelev anton.txt at gmail.com
Tue May 17 21:35:24 CEST 2011

Hello all,

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.

This happens even with the smallest and emptiest plugin pos-
sible,  when  it  neither subscribes for any event nor calls
any API functions. The minimal plugin only provides  minimal
implementations  of  the  basic  interface  functions simply
reporting the start of every  function  to  the  debug  log,
which  is  created when Sylpheed is invoked with the --debug

Then I tried coding the same plugin in C, using the  Tiny  C
Compiler,  and  it worked pretty well, wherefrom I concluded
that something must be wrong with FreePascal's  DLL  genera-
tion, so I have come here for help.

Attached are the C and Pascal sources of the minimal plugin.
A package with the same sources plus  the  binaries  can  be
downloaded here:


This  is  the original report of the problem on the Sylpheed
mailing list:


After I had encountered the problem I started to  strip  the
plugin of its functionality and dependencies until I had the
bare skeleton which still  didn't  work  and  which  I  have

If you need any further information, please ask.

Thanks in advnace,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testplug.c
Type: text/x-csrc
Size: 1242 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110517/b9d263f5/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testplug.pas
Type: text/x-pascal
Size: 1226 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110517/b9d263f5/attachment.pas>

More information about the fpc-pascal mailing list