first of all i made a mistake it is not :
(I used a previously defined value in config.in but we don't need it)
So i think you should change it into plugin.c
for my apology, it was late when i worked on it.

for export LD_LIBRARY_PATH=/usr/lib/gretl-gtk2,
I don't know what to say. when i run any software built for using the module i got :
Failed to load plugin: lad.dll
when i set LD_LIBRARY_PATH it works.
but i'm not sure that dlopen look into subdirectories of /usr/lib in linux or macosx
Are you sure that gretl-gtk2 is not a configured path given in arguments of dlopen by libgretl and not configured into cygwin ?

2010/6/18 Allin Cottrell <cottrell@wfu.edu>

On Thu, 17 Jun 2010, denis joubert wrote:

> and you need to set the environnement with the path of the plugins like this :
> export LD_LIBRARY_PATH=/usr/lib/gretl-gtk2
> (i installed gretl in /usr)

Why is that needed?  The gretl plugins are dlopen'd on demand.
Provided the path to the plugins is right (and I think we just
fixed that, with the change to plugins.c) I don't see any reason
why the plugins directory needs to be in LD_LIBRARY_PATH. That's
certainly not the case on Linux or OS X.

Gretl-devel mailing list