Re: error compiling bonobo-activation, glib related?
- From: Owen Taylor <otaylor redhat com>
- To: Maciej Stachowiak <mjs noisehavoc org>
- Cc: Rodrigo Moya <rodrigo gnome-db org>, Darin Adler <darin bentspoon com>, Laca ireland sun com, gnome-2-0-list gnome org
- Subject: Re: error compiling bonobo-activation, glib related?
- Date: 24 Aug 2001 21:48:48 -0400
Maciej Stachowiak <mjs noisehavoc org> writes:
> On 23Aug2001 12:01AM (+0200), Rodrigo Moya wrote:
> > On Wed, 2001-08-22 at 23:20, Maciej Stachowiak wrote:
> > > On 22Aug2001 10:22PM (+0200), Rodrigo Moya wrote:
> > > > On Wed, 2001-08-22 at 21:25, Darin Adler wrote:
> > > > > On Wednesday, August 22, 2001, at 12:09 PM, Rodrigo Moya wrote:
> > > > >
> > > > > > yes, and it worked perfectly well, no error messages
> > > > >
> > > > > OK. Lets try this:
> > > > >
> > > > > gcc -DHAVE_CONFIG_H \
> > > > > -DBONOBO_ACTIVATION_LOCALEDIR=\"/gnome/head/INSTALL/share/locale\" \
> > > > > -DORBIT2=1 -I/gnome/head/INSTALL/include/glib-2.0 \
> > > > > -I/gnome/head/INSTALL/lib/glib-2.0/include
> > > > > -I/gnome/head/INSTALL/include \
> > > > > -DVERSION=\"0.9.1\" -ansi -std=c99 -D_POSIX_C_SOURCE=199506L \
> > > > > -D_BSD_SOURCE -Wall -Wchar-subscripts -Wmissing-declarations \
> > > > > -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align \
> > > > > -Wsign-compare -g -O2 -c \
> > > > > test.c -fPIC -DPIC -o test.c.o
> > > > >
> > > > > Does that work?
> > > > >
> > > > no, it gives the same error:
> > > >
> > > > test.c:0: malformed option `-D __STRICT_ANSI__-trigraphs'
> > > >
> > >
> > > Maybe it's confused by passing both -ansi and -std=c99 (which is
> > > unnecessary anyway). Try taking out -ansi and leaving in only -st=c99.
> > >
> > ok, removing -ansi gives:
> >
> > cc1: unknown C standard `c99'
> >
> > re-adding -ansi and removing -std=c99 seems to work, both for the test
> > program and the Bonobo_Unknown-common.c file. But I still get the glib
> > problem (__VA_ARGS__).
> >
>
> The -std=c99 was specifically to avoid that glib problem. what version
> of gcc do you have? Does -std=c9x work?
We use the attached patch for the stable branch of GTK+ for the Red
Hat SRPM. If people wants to try this adding magic to gmessages.h and
give it some testing on various compilers, that could be useful.
I think adding -std=c99 is probably better avoided, since it somewhat
negates the effect of -ansi -pedentic in terms of other non-portable
constructs.
Thanks,
Owen
--- glib-1.2.10/glib.h.isowarning Mon Feb 26 22:44:38 2001
+++ glib-1.2.10/glib.h Sat Jul 21 19:36:31 2001
@@ -1291,6 +1291,13 @@
#ifndef G_LOG_DOMAIN
#define G_LOG_DOMAIN ((gchar*) 0)
#endif /* G_LOG_DOMAIN */
+
+/* Suppress warnings when GCC is in -pedantic mode and not -std=c99
+ */
+#if (__GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
+#pragma GCC system_header
+#endif
+
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define g_error(...) g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_ERROR, \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]