CarbonWolf / aff4

Automatically exported from code.google.com/p/aff4
GNU General Public License v3.0
0 stars 0 forks source link

Conflicts in public include header #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
/usr/local/include/aff4.h:1141: error: using typedef-name ‘RDFValue’ after 
‘struct’
/usr/local/include/aff4.h:862: error: ‘RDFValue’ has a previous declaration 
here

removing or commenting the statement at line 1141 does the trick for me.

Also line 1218 contains: void (*delete) (RDFURN urn);
Note that delete is a C++ keyword
It currently prevents g++ from compiling code that includes aff4.h, e.g. on 
aff4imager.c

/usr/local/include/aff4.h:1222: error: expected unqualified-id before 
‘delete’
/usr/local/include/aff4.h:1222: error: expected ‘)’ before ‘delete’
In file included from aff4imager.c:2:
/usr/local/include/aff4.h:1809: error: expected ‘,’ or ‘...’ before 
‘namespace’

possible solution is to change the name of the function or consider it as an 
over-loadable operator but it has to have void return type and get a void* 
parameter void (*delete)( void *urn );

There seems to be a lot of internal library code in the public include header, 
which does not improve its readability. Please consider using 'opaque pointers'.

Original issue reported on code.google.com by joachim.metz@gmail.com on 18 Aug 2010 at 3:19

GoogleCodeExporter commented 8 years ago
This seems to be a problem with the g++ compiler. It seems to be much more 
strict and also has reserved words like "delete" which the regular gcc doesnt 
care about.

I have gone through and rejigged the code to not use these reserved words.

Original comment by scude...@gmail.com on 19 Aug 2010 at 9:38