Re: C++ Bindings Generate static const Code that will not Compile



On Tue, 25 Nov 2003, Bowie Owens wrote:

> lgust verizon net wrote:
>
> >Hi Bowie,
> >
> >We have verified that we checked out of CVS the source code with
> >your change. Now when I run my test program the IDL compiler
> >generates the following statement:
> >
> >        static  char const* const SIZE = "SIZE";
> >
> >The statement causes the same compilation error that I saw before
> >the change:
> >
> >gcc -c -g -DORBIT2=1 -D_REENTRANT -I/home/nfr/local/include/orbit2.0
> >-I/home/nfr/local/include/linc-1.0
> >-I/home/nfr/local/include/glib-2.0
> >-I/home/nfr/local/lib/glib2.0/include
> >-I/home/nfr/local/include/orbitcpp-2.0 client.cc
> >In file included from cf-cpp-stubs.h:11,
> >                 from client.cc:3:
> >cf-cpp-common.h:46: invalid in-class initialization of static data member of
> >   non-integral type `const char* const'
> >
> >I'm using gcc 3.2 to compile this test program:
> >
> >[lgust urouter17 ~/test/rose-cf] $ gcc --version
> >gcc (GCC) 3.2.3
> >
> >
> I managed to reproduce the error you are getting. But to do so I had to
> switch on -pedantic. Are you using using this flag in your build?
> (Obviously it isn't listed above.) Was your GCC installed from a
> standard package or was it built manually?

Hi, I'm sort of working with Larry on this at our end.

We are not setting -pendantic in our build of orbitcpp. Our build of
orbitcpp is pretty basic, we only specify the install location with
--prefix.

The GCC that was used for this build is gcc-3.2.3 and was built manually
from the gcc sources. It is a pretty standard build with only the prefix
specified. The output of gcc -v are:

[nfr urouter19 ~] $ gcc -v
Reading specs from
/home/nfr/local/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs
Configured with: ../gcc-3.2.3/configure
--prefix=/home/nfr/local/stow/gcc-3.2.3
Thread model: posix
gcc version 3.2.3

The machines this is being built on are Debian 3.0 (the current stable
version of Debian) and are pretty standard (for Debian anyway) except for
the compiler.


Thanks...





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