Index: kalarm/resources/resourcelocaldir_plugin.cpp
===================================================================
--- kalarm/resources/resourcelocaldir_plugin.cpp	(revision 788608)
+++ kalarm/resources/resourcelocaldir_plugin.cpp	(working copy)
@@ -26,13 +26,16 @@
 #include "resourcelocaldir.h"
 #include "resourcelocaldirwidget.h"
 
-extern "C"
+class ResourceLocalDirFactory : public KRES::PluginFactory<KAResourceLocalDir, ResourceLocalDirConfigWidget>
 {
-	KDE_EXPORT void* init_kalarm_localdir()
-	{
+	public:
+		ResourceLocalDirFactory()
+			: KRES::PluginFactory<KAResourceLocalDir, ResourceLocalDirConfigWidget>()
+		{
 #ifndef KALARM_STANDALONE
-		KGlobal::locale()->insertCatalog("libkcal");
+			KGlobal::locale()->insertCatalog("libkcal");
 #endif
-		return new KRES::PluginFactory<KAResourceLocalDir, ResourceLocalDirConfigWidget>();
-	}
-}
+		}
+};
+
+K_EXPORT_PLUGIN(ResourceLocalDirFactory)
Index: kalarm/resources/resourcelocal_plugin.cpp
===================================================================
--- kalarm/resources/resourcelocal_plugin.cpp	(revision 788608)
+++ kalarm/resources/resourcelocal_plugin.cpp	(working copy)
@@ -26,13 +26,16 @@
 #include "resourcelocal.h"
 #include "resourcelocalwidget.h"
 
-extern "C"
+class ResourceLocalFactory : public KRES::PluginFactory<KAResourceLocal, ResourceLocalConfigWidget>
 {
-	KDE_EXPORT void* init_kalarm_local()
-	{
+	public:
+		ResourceLocalFactory()
+			: KRES::PluginFactory<KAResourceLocal, ResourceLocalConfigWidget>()
+		{
 #ifndef KALARM_STANDALONE
-		KGlobal::locale()->insertCatalog("libkcal");
+			KGlobal::locale()->insertCatalog("libkcal");
 #endif
-		return new KRES::PluginFactory<KAResourceLocal, ResourceLocalConfigWidget>();
-	}
-}
+		}
+};
+
+K_EXPORT_PLUGIN(ResourceLocalFactory)
Index: kalarm/resources/resourceremote_plugin.cpp
===================================================================
--- kalarm/resources/resourceremote_plugin.cpp	(revision 788608)
+++ kalarm/resources/resourceremote_plugin.cpp	(working copy)
@@ -26,14 +26,17 @@
 #include "resourceremote.h"
 #include "resourceremotewidget.h"
 
-extern "C"
+class ResourceRemoteFactory : public KRES::PluginFactory<KAResourceRemote, ResourceRemoteConfigWidget>
 {
-	KDE_EXPORT void* init_kalarm_remote()
-	{
+	public:
+		ResourceRemoteFactory()
+			: KRES::PluginFactory<KAResourceRemote, ResourceRemoteConfigWidget>()
+		{
 #ifndef KALARM_STANDALONE
-		KGlobal::locale()->insertCatalog("libkcal");
-		KGlobal::locale()->insertCatalog("kres_remote");
+			KGlobal::locale()->insertCatalog("libkcal");
+			KGlobal::locale()->insertCatalog("kres_remote");
 #endif
-		return new KRES::PluginFactory<KAResourceRemote, ResourceRemoteConfigWidget>();
-	}
-}
+		}
+};
+
+K_EXPORT_PLUGIN(ResourceRemoteFactory)
