How compile a plugin for pidgin

dolphin dolphin cdg974 at gmail.com
Tue May 8 16:48:01 EDT 2007


Hello,

I want to write a pidgin's plugin. I start with the code of autoaccept
plugin for learn. I simplify it. But I don't know/understand how compile
this source code. I write this makefile. (I'm under linux ubuntu dapper
drake).

GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
GLIB_LIBS = -Wl,--export-dynamic -pthread -lgobject-2.0 -lgmodule-2.0 -ldl -
lgthread-2.0 -lglib-2.0

install:plugin.so
    cp -fv plugin.so /home/user/.purple/plugins/plugin.so
    cp -fv plugin.la /home/user/.purple/plugins/plugin.la

plugin.so: plugin.cc
    g++ -shared -o plugin.so plugin.cc $(GLIB_CFLAGS) $(GLIB_LIBS)

clean:
    find . -name "*.*~" -exec rm {} \;
    find . -name "plugin.so" -exec rm {} \;
    find . -name "plugin.la" -exec rm {} \;
    find /home/user/.purple/plugins/ -name "plugin.so" -exec rm {} \;

the lib compile but when I launch pidgin with -d flags I obtain this error
message

plugins: /home/user/.purple/plugins/plugin.so is not usable because the
'purple_init_plugin' symbol could not be found.  Does the plugin call the
PURPLE_INIT_PLUGIN() macro?

I write the code

PURPLE_INIT_PLUGIN(PLUGIN_STATIC_NAME, init_plugin, info)

in the source code.

thanks for your help

-- 
Sorry for my bad level in english.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20070509/a4242e71/attachment.html>


More information about the Devel mailing list