r20593 - gnucash/trunk/src - Win32: Undefine G_MODULE_EXPORT in our internal libraries. Please do not use it.

Christian Stimming cstim at code.gnucash.org
Sat Apr 23 14:58:44 EDT 2011


Author: cstim
Date: 2011-04-23 14:58:43 -0400 (Sat, 23 Apr 2011)
New Revision: 20593
Trac: http://svn.gnucash.org/trac/changeset/20593

Modified:
   gnucash/trunk/src/gnome-utils/dialog-account.c
   gnucash/trunk/src/gnome/assistant-hierarchy.c
Log:
Win32: Undefine G_MODULE_EXPORT in our internal libraries. Please do not use it.

The rest of gnucash relies on *everything* being exported.  This is done by
mingw's linker, but only if no symbol at all was marked as being exported.
As soon as at least one symbol is manually marked as export, nothing except
those marked symbols are exported, which will immediately lead to
"unresolved symbols" in the win32 build.

Modified: gnucash/trunk/src/gnome/assistant-hierarchy.c
===================================================================
--- gnucash/trunk/src/gnome/assistant-hierarchy.c	2011-04-23 14:52:54 UTC (rev 20592)
+++ gnucash/trunk/src/gnome/assistant-hierarchy.c	2011-04-23 18:58:43 UTC (rev 20593)
@@ -57,6 +57,16 @@
 
 #define GCONF_SECTION "dialogs/new_hierarchy"
 
+#ifdef G_MODULE_EXPORT
+/* No separate marking of functions as "DLL export", please: The rest
+ * of gnucash relies on *everything* being exported.  As soon as at
+ * least one function is manually marked as export, nothing except
+ * those marked functions are exported, which will break the build on
+ * Windows. */
+# undef G_MODULE_EXPORT
+# define G_MODULE_EXPORT
+#endif
+
 typedef enum
 {
     COL_CHECKED,

Modified: gnucash/trunk/src/gnome-utils/dialog-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-account.c	2011-04-23 14:52:54 UTC (rev 20592)
+++ gnucash/trunk/src/gnome-utils/dialog-account.c	2011-04-23 18:58:43 UTC (rev 20593)
@@ -56,6 +56,16 @@
 #define GCONF_SECTION "dialogs/account"
 #define DEFAULT_COLOR "#ededececebeb"
 
+#ifdef G_MODULE_EXPORT
+/* No separate marking of functions as "DLL export", please: The rest
+ * of gnucash relies on *everything* being exported.  As soon as at
+ * least one function is manually marked as export, nothing except
+ * those marked functions are exported, which will break the build on
+ * Windows. */
+# undef G_MODULE_EXPORT
+# define G_MODULE_EXPORT
+#endif
+
 enum account_cols
 {
     ACCOUNT_COL_FULLNAME = 0,



More information about the gnucash-changes mailing list