From: Dave Wysochanski <dwysocha@redhat.com>
To: lvm-devel@redhat.com
Subject: error using the lvm library in C++
Date: Mon, 21 Jun 2010 20:39:24 -0400 [thread overview]
Message-ID: <1277167164.10260.37.camel@f10-node1> (raw)
In-Reply-To: <201006211640.13309.benscott@nwlink.com>
On Mon, 2010-06-21 at 16:40 -0700, ben scott wrote:
> I am still running into trouble using the lvm library. Following the example
> in lvm2app.h I tried:
>
>
> dm_list *vgnames;
> lvm_str_list *strl;
>
> vgnames = lvm_list_vg_names( lvm_pointer );
>
> dm_list_iterate_items(strl, vgnames) {
> qDebug() << QString( strl->str );
> }
>
> I get this error:
>
> masterlist.cpp:83: error: ?typeof? was not declared in this scope
> masterlist.cpp:83: error: expected primary-expression before ?)? token
> masterlist.cpp:83: error: expected primary-expression before ?)? token
> masterlist.cpp:83: error: expected ?)? before numeric constant
> masterlist.cpp:83: error: expected ?)? before ?;? token
> etc...
>
> Is it coming from the file libdevmapper.h?
>
Can you post your code?
Attached is a sample C++ hack that works for me with upstream lvm + dm
CVS. Make sure you are pointing at the right header files and linking
to the correct libraries.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: masterlist.cpp
Type: text/x-c++src
Size: 812 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20100621/2b221678/attachment.bin>
prev parent reply other threads:[~2010-06-22 0:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-21 23:40 error using the lvm library in C++ ben scott
2010-06-22 0:35 ` Alasdair G Kergon
2010-06-22 0:39 ` Dave Wysochanski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1277167164.10260.37.camel@f10-node1 \
--to=dwysocha@redhat.com \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.