diff --git a/glib/src/optiongroup.ccg b/glib/src/optiongroup.ccg
index dfa9d0e..2754349 100644
--- a/glib/src/optiongroup.ccg
+++ b/glib/src/optiongroup.ccg
@@ -181,8 +181,7 @@ gboolean OptionGroup::post_parse_callback(GOptionContext* context,
   return false;
 }
 
-//static
-gboolean OptionGroup::option_arg_callback(const gchar* option_name, const gchar* value,
+gboolean OptionGroup_option_arg_callback(const gchar* option_name, const gchar* value,
   gpointer data, GError** error)
 {
   const Glib::ustring cpp_option_name(option_name);
@@ -489,7 +488,7 @@ void OptionGroup::CppOptionEntry::allocate_c_arg()
     case G_OPTION_ARG_CALLBACK:
     {
       //The C arg pointer is a function pointer.
-      carg_ = reinterpret_cast<void*>(&OptionGroup::option_arg_callback);
+      carg_ = reinterpret_cast<void*>(&OptionGroup_option_arg_callback);
 
       break;
     }
diff --git a/glib/src/optiongroup.hg b/glib/src/optiongroup.hg
index 8298f79..8a8a7b5 100644
--- a/glib/src/optiongroup.hg
+++ b/glib/src/optiongroup.hg
@@ -37,8 +37,12 @@ namespace Glib
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
 class OptionEntry;
 class OptionContext;
-#endif //DOXYGEN_SHOULD_SKIP_THIS
 
+/** This is not public API. Do not call this function directly.
+ */
+gboolean OptionGroup_option_arg_callback(const gchar* option_name, const gchar* value, gpointer data, GError** error);
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+ 
 /** An OptionGroup defines the options in a single group. 
  * Libraries which need to parse commandline options are expected to provide a function that allows their OptionGroups to
  * be added to the application's OptionContext.
@@ -140,9 +144,8 @@ protected:
 
   static gboolean post_parse_callback(GOptionContext* context,
     GOptionGroup* group, gpointer data, GError** error);
-
-  static gboolean option_arg_callback(const gchar* option_name, const gchar* value,
-    gpointer data, GError** error);
+    
+  friend gboolean OptionGroup_option_arg_callback(const gchar* option_name, const gchar* value, gpointer data, GError** error);
 
   //Map of entry names to CppOptionEntry:
   typedef std::map<Glib::ustring, CppOptionEntry> type_map_entries;
