problem #including <lvm2ap.h> using cvs
I want to start putting the lvm library in my app but have run into a snag. When I put the line:
#include <lvm2app.h>
in my program, I get the following error:
In file included from /usr/include/lvm2app.h:17,
/usr/include/libdevmapper.h:1025: error: expected ‘,’ or ‘...’ before ‘private’/usr/include/libdevmapper.h:1047: error: expected ‘,’ or ‘...’ before ‘private’
The relevant portion of libdevmapper.h look like this:
struct dm_report_field_type {
uint32_t type; /* object type id */
uint32_t flags; /* DM_REPORT_FIELD_* */
uint32_t offset; /* byte offset in the object */
int32_t width; /* default width */
const char id[32]; /* string used to specify the field */ const char heading[32]; /* string printed in header */ int (*report_fn)(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field, const void *data, void *private);
const char *desc; /* description of the field */
};
I am running Debian unstable in 64 bits. Any Idea what I am doing wrong here?
Thank you.
Quoted 1 line · ben scott
Any Idea what I am doing wrong here?
Not without seeing the code up to the point of the error. Sometimes the output of 'gcc -E' or language-specific syntax highlighting modes of editors help you to see what's going wrong.
Alasdair
Quoted 8 lines · Alasdair G Kergon
Quoted 1 line · ben scott
Any Idea what I am doing wrong here?
Not without seeing the code up to the point of the error. Sometimes the output of 'gcc -E' or language-specific syntax highlighting modes of editors help you to see what's going wrong.
Alasdair
The code was simply the include statement itself, it was at the top of the file.
#include <lvm2app.h>
I haven't tried to actually use the library yet.
Are you using g++ instead of gcc to compile? The code block I'm looking at looks like C code, but that error is C++.
Quoted 39 lines · ben scott
I want to start putting the lvm library in my app but have run into a snag. When I put the line:
#include <
lvm2app.h>in my program, I get the following error:
�In file included from
/usr/include/lvm2app.h:17,
/usr/include/libdevmapper.h:1025: error: expected �,� or �...� before �private�/usr/include/libdevmapper.h:1047: error: expected �,� or �...� before �private�The relevant portion of
libdevmapper.hlook like this:struct
dm_report_field_type{
� � � �uint32_t type; � � � � �/* object type id */
� � � �uint32_t flags; � � � � /* DM_REPORT_FIELD_* */
� � � �uint32_t offset; � � � �/* byte offset in the object */ � � � �int32_t width; � � � � �/* default width */
� � � �const char id[32]; � � �/* string used to specify the field */ � � � �const char heading[32]; /* string printed in header */ � � � �int (*report_fn)(structdm_report*rh, structdm_pool*mem, � � � � � � � � � � � � structdm_report_field*field, const void *data, � � � � � � � � � � � � void *private);
� � � �const char *desc; � � � /* description of the field */ };I am running Debian unstable in 64 bits. Any Idea what I am doing wrong here?
Thank you.
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/