[Rprotobuf-yada] skeletic implementation of proto messages using external pointers

Romain Francois romain.francois at dbmail.com
Thu Oct 29 12:43:25 CET 2009


On 10/29/2009 12:31 PM, Dirk Eddelbuettel wrote:
> On 29 October 2009 at 11:38, Romain Francois wrote:
> | On 10/29/2009 11:21 AM, Dirk Eddelbuettel wrote:
> |>  Very nice!
> |
> | I'll be nicer when there is some actual code, at the moment I'm juggling
> | with nil external pointers and R_NilValue, etc ...
>
> Hehe.
>
> | Quick question, I want to include some header files from libproto, so
> | something like this is=n my rprotobuf.h
> |
> | #include<google/protobuf/compiler/importer.h>
> |
> | but I get this :
> |
> | protoc --cpp_out=. addressbook.proto
> | g++ -c addressbook.pb.cc -fpic -shared
> | -I/usr/local/lib/R/library/Rcpp/lib -I/usr/include
> | g++ -I/usr/local/lib/R/include -I/usr/local/lib/R/library/Rcpp/lib
> | -I/usr/include -I/usr/local/include    -fpic  -g -O2 -c
> | list_people_R.cpp -o list_people_R.o
> | g++ -I/usr/local/lib/R/include -I/usr/local/lib/R/library/Rcpp/lib
> | -I/usr/include -I/usr/local/include    -fpic  -g -O2 -c rprotobuf.cpp -o
> | rprotobuf.o
> | In file included from /usr/include/google/protobuf/descriptor.pb.h:24,
> |                   from /usr/include/google/protobuf/compiler/parser.h:46,
> |                   from /usr/include/google/protobuf/compiler/importer.h:47,
> |                   from rprotobuf.h:14,
> |                   from rprotobuf.cpp:3:
> | /usr/include/google/protobuf/extension_set.h:378: error: expected
> | identifier before ‘(’ token
> | /usr/include/google/protobuf/extension_set.h:378: error: ‘parameter’
> | declared as function returning a function
> | /usr/include/google/protobuf/extension_set.h:378: error: expected ‘)’
> | before ‘,’ token
>
> Line 378 is part of a large comment block for me :-/
>
> Which version?  I have Debian's 2.1 of ProtoBuf.
>
> Sametime #defines in R clash.  I'll try to take a look later but no promises.


$ yum provides protobuf

...

protobuf-2.2.0-2.fc11.i586 : Protocol Buffers - Google's data 
interchange format
Repo        : installed
Matched from:
Other       : Provides-match: protobuf

Line 378 is the middle line of :

     int GetSize() const;
     void Free();
     int SpaceUsedExcludingSelf() const;

I'll keep looking


> | Any clue ? It's probably something minor ...
> |
> |
> |>  I am a little swamped right now and may not be able to catch up immediately
> |>  but I will try. Part of my home network conked out and I need to redo that.
> |>
> |>  Saptarshi: did you get an r-forge id so that we can add you to the project?
> |>  Can I assume that you are on this list?
> |
> | I registered both of you. I have just registered the user "saptarshi" as
> | I don't think there are many, so both of you should have write access to
> | the svn repo.
>
> Well I created the repo so I was admin before you became one :)
>
> Dirk
>


-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/BcPw : celebrating R commit #50000
|- http://tr.im/ztCu : RGG #158:161: examples of package IDPmisc
`- http://tr.im/yw8E : New R package : sos



More information about the Rprotobuf-yada mailing list