C++ Pidgin plugin

Ethan Blanton elb at pidgin.im
Sun Nov 29 20:30:59 EST 2009


Michał Dulko spake unto us the following wisdom:
> Is there any way to write Pidgin plugin in C++? I tried, but sample
> helloworld plugin is not visible in plugin list, when I compile it as
> C++.

Yes, but it requires that you understand the interactions between C
and C++.

The primary thing to be aware of is that Pidgin expects any symbols it
uses to be C symbols, not C++ symbols; this means that any functions
you provide for the Pidgin interface must be declared as 'extern "C"'.
Static constructors may also not be called, I'm not sure.

This is a topic which is beyond the scope of this mailing list, but
should be covered by most comprehensive C++ texts.

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 481 bytes
Desc: Digital signature
URL: <http://pidgin.im/pipermail/devel/attachments/20091129/a1ea6c3c/attachment.sig>


More information about the Devel mailing list