Compiling Hello World plugin

View: New views
3 Messages — Rating Filter:   Alert me  

Compiling Hello World plugin

by Sindhu Sundar :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Hi!

I intend to write a plugin for pidgin, which will show all online
buddies in a tooltip when the cursor hovers over the system tray.

I read the wiki page on how to write a plugin in C, the hello world
plugin but I have been receiving these errors when I compile.

sindhu@sindhu-eee:~/Desktop/Code/Online_Buddies_Tooltip/pidgin-2.5.5/libpurple/plugins$
gcc -o helloworld helloworld.c
helloworld.c:34:18: error: glib.h: No such file or directory
helloworld.c:46:20: error: notify.h: No such file or directory
helloworld.c:47:20: error: plugin.h: No such file or directory
helloworld.c:48:21: error: version.h: No such file or directory
helloworld.c:53: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
helloworld.c:59: error: expected ‘)’ before ‘*’ token
helloworld.c:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
helloworld.c:92: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘plugin_load’
helloworld.c:105: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘info’
helloworld.c:142: error: expected ‘)’ before ‘*’ token
helloworld.c: In function ‘PURPLE_INIT_PLUGIN’:
helloworld.c:146: error: expected ‘{’ at end of input
sindhu@sindhu-eee:~/Desktop/Code/Online_Buddies_Tooltip/pidgin-2.5.5/libpurple/plugins$

I don't know how to proceed from here. I have basic knowledge about C,
I have compiled code in C on my Ubuntu system before this, but never
my own code.

Please help. Thanks :)

_______________________________________________
Devel mailing list
Devel@...
http://pidgin.im/cgi-bin/mailman/listinfo/devel

Re: Compiling Hello World plugin

by Ethan Blanton-3 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Sindhu Sundar spake unto us the following wisdom:
> I read the wiki page on how to write a plugin in C, the hello world
> plugin but I have been receiving these errors when I compile.
>
> sindhu@sindhu-eee:~/Desktop/Code/Online_Buddies_Tooltip/pidgin-2.5.5/libpurple/plugins$
> gcc -o helloworld helloworld.c

You will note that this is *not* how the HOWTO tells you to compile
the plugin.  There is a reason for that.  If you follow the
instructions in the HOWTO carefully, it should compile.  (I.e., using
'make' to compile your plugin, in this case.)

Ethan

--
The laws that forbid the carrying of arms are laws [that have no remedy
for evils].  They disarm only those who are neither inclined nor
determined to commit crimes.
                -- Cesare Beccaria, "On Crimes and Punishments", 1764


_______________________________________________
Devel mailing list
Devel@...
http://pidgin.im/cgi-bin/mailman/listinfo/devel

signature.asc (492 bytes) Download Attachment

Re: Compiling Hello World plugin

by Ka-Hing Cheung-3 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

On Mon, 2009-09-28 at 20:02 +0530, Sindhu Sundar wrote:

> Hi!
>
> I intend to write a plugin for pidgin, which will show all online
> buddies in a tooltip when the cursor hovers over the system tray.
>
> I read the wiki page on how to write a plugin in C, the hello world
> plugin but I have been receiving these errors when I compile.
>
> sindhu@sindhu-eee:~/Desktop/Code/Online_Buddies_Tooltip/pidgin-2.5.5/libpurple/plugins$
> gcc -o helloworld helloworld.c

try this in the same directory:
$ make helloworld.so

-khc


_______________________________________________
Devel mailing list
Devel@...
http://pidgin.im/cgi-bin/mailman/listinfo/devel