[antlr-interest] Problem with autotools while using antlr3 C runtime

Jim Idle jimi at temporal-wave.com
Tue Oct 11 08:35:35 PDT 2011


Yeah, I think that we can probably do that as the C runtime does not
reference those defines. Ideally, you should not encounter a need to include
config.h from two separate non-sub-packages.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Kirby Bohling
> Sent: Tuesday, October 11, 2011 7:01 AM
> To: 金杰
> Cc: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] Problem with autotools while using antlr3
> C runtime
>
> Use no-define in the configure.ac file.
>
> AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
>
> See:
> http://gcc.gnu.org/svn/gcc/branches/cilkplus/libstdc++-v3/configure.ac
> or
> http://www.delorie.com/gnu/docs/automake/automake_24.html
>
> I think this is a sign you or the other package are using the config.h
> file wrong, but that's a different discussion.  At least that's my
> guess, I haven't tried it.
>
> Kirby
>
>
> On Tue, Oct 11, 2011 at 3:36 AM, 金杰 <hellojinjie at gmail.com> wrote:
> > Hi All,
> >
> > the antlr3 C runtime is build with autotools.
> > the autotools generate a header antlr3config.h, this header has
> > defined: #define PACKAGE "libantlr3c"
> >
> > my project is also build with autotools, there is a header config.h,
> > which
> > define: #define PACKAGE "polaris"
> > when I compile my code, there is an error:
> >
> > In file included from /opt/antlr3c/include/antlr3defs.h:246,
> >                 from /opt/antlr3c/include/antlr3.h:33,
> >                 from PolarisAdmin.cc:13:
> > /opt/antlr3c/include/antlr3config.h:96:1: error: "PACKAGE" redefined
> >
> > the error indicate that  "PACKAGE" has redefined.
> >
> > is it a bug?  (:
> > how can I avoid this error?
> >
> > thank you in advance.
> > --
> > hellojinjie
> >
> > List: http://www.antlr.org/mailman/listinfo/antlr-interest
> > Unsubscribe:
> > http://www.antlr.org/mailman/options/antlr-interest/your-email-
> address
> >
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address


More information about the antlr-interest mailing list