Hello,

I'm currently attempting to write a node.js addon avro-c (
http://github.com/tmpvar/node-avro).  I'm using avro-c because it seemed
like the c++ port was not quite ready. Compiling goes smoothly until I
include avro.h, which outputs the following (waf output):

## Output  ##

17:31:55 runner system command -> ['/usr/bin/g++', '-fPIC', '-DPIC',
'-DEV_MULTIPLICITY=0', '-Idefault', '-I..',
'-I/home/tmpvar/work/javascript/node-avro/deps/build/include',
'-I/usr/local/include/node', '../binding.cc', '-c', '-o',
'default/binding_1.o']
In file included from ../binding.h:4,
                 from ../binding.cc:1:
/home/tmpvar/work/javascript/node-avro/deps/build/include/avro.h:93: error:
conflicting declaration ‘typedef struct avro_reader_t* avro_reader_t’
/home/tmpvar/work/javascript/node-avro/deps/build/include/avro.h:93: error:
‘struct avro_reader_t’ has a previous declaration as ‘struct avro_reader_t’
/home/tmpvar/work/javascript/node-avro/deps/build/include/avro.h:94: error:
conflicting declaration ‘typedef struct avro_writer_t* avro_writer_t’
/home/tmpvar/work/javascript/node-avro/deps/build/include/avro.h:94: error:
‘struct avro_writer_t’ has a previous declaration as ‘struct avro_writer_t’
/home/tmpvar/work/javascript/node-avro/deps/build/include/avro.h:131: error:
conflicting declaration ‘typedef struct avro_schema_error_t*
avro_schema_error_t’
/home/tmpvar/work/javascript/node-avro/deps/build/include/avro.h:131: error:
‘struct avro_schema_error_t’ has a previous declaration as ‘struct
avro_schema_error_t’
/home/tmpvar/work/javascript/node-avro/deps/build/include/avro.h:262: error:
conflicting declaration ‘typedef struct avro_file_reader_t*
avro_file_reader_t’
/home/tmpvar/work/javascript/node-avro/deps/build/include/avro.h:262: error:
‘struct avro_file_reader_t’ has a previous declaration as ‘struct
avro_file_reader_t’
/home/tmpvar/work/javascript/node-avro/deps/build/include/avro.h:263: error:
conflicting declaration ‘typedef struct avro_file_writer_t*
avro_file_writer_t’
/home/tmpvar/work/javascript/node-avro/deps/build/include/avro.h:263: error:
‘struct avro_file_writer_t’ has a previous declaration as ‘struct
avro_file_writer_t’

## End Output  ##

## binding.cc ##

#include <node.h>
#include <node_events.h>
#include <assert.h>
#include <avro.h>

using namespace v8;
using namespace node;

extern "C" void
init (Handle<Object> target)
{
  HandleScope scope;
}

## End binding.cc ##

Is there anything I can do to resolve these errors (without modifying avro,
of course)?

Thank You,
-- Elijah

Reply via email to