Re: Re: C++ Bindings Generate static const Code that will not Compile
- From: <lgust verizon net>
- To: Bowie Owens <bowie owens csiro au>
- Cc: <orbitcpp-list gnome org>, <sawitt electra rsc raytheon com>
- Subject: Re: Re: C++ Bindings Generate static const Code that will not Compile
- Date: Mon, 24 Nov 2003 15:50:49 -0600
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
Regards,
Larry S. Gustafson
>
> From: Bowie Owens <bowie owens csiro au>
> Date: 2003/11/23 Sun PM 03:51:52 CST
> To: lgust verizon net
> CC: orbitcpp-list gnome org, sawitt electra rsc raytheon com
> Subject: Re: C++ Bindings Generate static const Code that will not Compile
>
> lgust verizon net wrote:
>
> >Hi Bowie,
> >
> >We checked out a copy of the orbitcpp module from CVS. After we
> >built and installed orbitcpp, I still see the same erroneous code:
> >
> >#undef SIZE
> > static const char *SIZE = "SIZE";
> >
> >
> Can you check the ChangeLog and make sure there is an entry that reads
> (should be at the top):
>
> 2003-11-20 Bowie Owens <bowie owens csiro au>
> * orbitcpp/idl-compiler/types/IDLString.cc
> * test/cpp/everything/everything.idl:
> Fix constness of string constants.
>
> And check that line 40 of orbitcpp/idl-compiler/types/IDLString.cc reads:
>
> ostr << indent << "char const* const " << cpp_id << " = " << value
>
>
> The anonymous cvs server may take a little while to sync with the
> developer server. If that was the problem, you can do a cvs update to
> bring your checkout copy up to date.
>
> >I noticed that building the orbitcpp package replaced the following
> >shared library:
> >
> >lrwxrwxrwx 1 nfr engr 51 Nov 21 09:47 libORBit-2-cpp.so -> ../stow/orbitcpp-cvs-20031120/lib/libORBit-2-cpp.so
> >
> >But it didn't replace the IDL compiler:
> >
> >lrwxrwxrwx 1 nfr engr 36 Nov 18 11:51 orbit-idl-2 -> ../stow/ORBit2-2.7.6/bin/orbit-idl-2
> >
> >Do we need to rebuild both the ORBit2 and orbitcpp packages from CVS to get your changes to work?
> >
> >
> No. Each language binding has it's own backend. Each backend is simply a
> .so/dll that implements a function which the idl compiler will call. So
> you can add new language bindings (or fix broken ones) without changing
> the lexer/parser.
>
>
> --
> 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]