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



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?

--
Bowie Owens

CSIRO Mathematical & Information Sciences
phone  : +61 3 9545 8055
fax    : +61 3 9545 8080
mobile : 0425 729 875
email  : Bowie Owens csiro au






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