Problem with glib-1.2.9/gmodule.c on Solaris 2.6/SPARC



While trying to build glib-1.2.9/gmodule/gmodule.c on Solaris
2.6/SPARC with the Sun C compiler:

cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../gmodule
-DG_LOG_DOMAIN=g_log_domain_gmodule -mr -Qn -xO2 -xtarget=generic
-D_REENTRANT -c gmodule.c  -KPIC -DPIC -o gmodule.o
"../glib.h", line 1327: undefined symbol: g_log_domain_gmodule
"../glib.h", line 1327: warning: improper pointer/integer combination: arg #1
"../glib.h", line 1336: undefined symbol: g_log_domain_gmodule
"../glib.h", line 1336: warning: improper pointer/integer combination: arg #1
"../glib.h", line 1345: undefined symbol: g_log_domain_gmodule
"../glib.h", line 1345: warning: improper pointer/integer combination: arg #1
"gmodule.c", line 213: warning: assignment type mismatch:

Looking at glib-1.2.9/gmodule/gmodule.h:
  #ifndef __GMODULE_H__
  #define __GMODULE_H__

  #include <glib.h>

  #ifdef __cplusplus
  extern "C" {
  #endif /* __cplusplus */

  extern const char      *g_log_domain_gmodule;

And, in glib-1.2.8/gmodule/gmodule.h:
  #ifndef __GMODULE_H__
  #define __GMODULE_H__

  #ifdef __cplusplus
  extern "C" {
  #endif /* __cplusplus */

  extern const char      *g_log_domain_gmodule;
  #include <glib.h>

How then, is glib.h going to use g_log_domain_gmodule in:
  ...
  #else   /* !__GNUC__ */
  static void
  g_error (const gchar *format,
           ...)
  {
    va_list args;
    va_start (args, format);
    g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args);
	    ^----------- = g_log_domain_gmodule
    va_end (args);
  }

if g_log_domain_gmodule is defined *after* glib.h is included?

-- 
albert chin (china thewrittenword com)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]