All of lore.kernel.org
 help / color / mirror / Atom feed
* error using the lvm library in C++
@ 2010-06-21 23:40 ben scott
  2010-06-22  0:35 ` Alasdair G Kergon
  2010-06-22  0:39 ` Dave Wysochanski
  0 siblings, 2 replies; 3+ messages in thread
From: ben scott @ 2010-06-21 23:40 UTC (permalink / raw)
  To: lvm-devel

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?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* error using the lvm library in C++
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Alasdair G Kergon @ 2010-06-22  0:35 UTC (permalink / raw)
  To: lvm-devel

It's easier to get a response if you can supply a standalone snippet of code
when reporting something like this so other people can try compiling it
directly.

First thing to try is to compile with -E and see how the pre-processed output
looks.

Alasdair



^ permalink raw reply	[flat|nested] 3+ messages in thread

* error using the lvm library in C++
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Wysochanski @ 2010-06-22  0:39 UTC (permalink / raw)
  To: lvm-devel

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-22  0:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.