How compile a plugin for pidgin

John Roark john.roark at gmail.com
Thu May 10 14:15:20 EDT 2007


Are you defining PURPLE_PLUGINS either adding -DPURPLE_PLUGINS to your 
CFLAGS or at the top of the main *.c file (the one with 
PURPLE_INIT_PLUGIN in it)?

John

dolphin dolphin wrote:
> 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 <http://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 <http://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.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Devel mailing list
> Devel at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/devel



More information about the Devel mailing list