C++ examples does not compile

49 views
Skip to first unread message

a.z.

unread,
Jan 26, 2016, 5:17:55 AM1/26/16
to Hypertable User
Hi,

We're experimenting with standalone installation of Hypertable 0.9.8.10 and trying to compile C++ example from
http://www.hypertable.com/documentation/code_examples/cpp

But it's failing with following errors:

g++ -c -Wall -std=c++11 -D_REENTRANT -DHAVE_NETINET_IN_H -I/opt/hypertable/current/include -I/opt/hypertable/current/include/thrift client_test.cc
client_test
.cc: In function void test_rename_alter(Hypertable::Thrift::Client*, std::ostream&)’:
client_test
.cc:94:11: error: class Hypertable::Thrift::Client has no member named alter_table
   client
->alter_table(ns, "foo_renamed", str);
           
^
client_test
.cc: In function void test_scan(Hypertable::Thrift::Client*, std::ostream&)’:
client_test
.cc:192:16: error: expected primary-expression before const
     foreach_ht
(const Hypertable::ThriftGen::Cell &cell, cells)
               
^
client_test
.cc:192:62: error: foreach_ht was not declared in this scope
     foreach_ht
(const Hypertable::ThriftGen::Cell &cell, cells)
                                                             
^
client_test
.cc:210:16: error: expected primary-expression before const
     foreach_ht
(const Hypertable::ThriftGen::Cell &cell, cells)
               
^
client_test
.cc:210:62: error: foreach_ht was not declared in this scope
     foreach_ht
(const Hypertable::ThriftGen::Cell &cell, cells)
                                                             
^
client_test
.cc: In function void test_scan_keysonly(Hypertable::Thrift::Client*, std::ostream&)’:
client_test
.cc:228:16: error: expected primary-expression before const
     foreach_ht
(const Hypertable::ThriftGen::Cell &cell, cells)
               
^
client_test
.cc:228:62: error: foreach_ht was not declared in this scope
     foreach_ht
(const Hypertable::ThriftGen::Cell &cell, cells)
                                                             
^
client_test
.cc: In function void test_schema(Hypertable::Thrift::Client*, std::ostream&)’:
client_test
.cc:258:25: error: AccessGroup was not declared in this scope
   std
::map<std::string, AccessGroup>::iterator ag_it = schema.access_groups.begin();
                         
^
client_test
.cc:258:36: error: template argument 2 is invalid
   std
::map<std::string, AccessGroup>::iterator ag_it = schema.access_groups.begin();
                                   
^
client_test
.cc:258:36: error: template argument 4 is invalid
client_test
.cc:258:48: error: expected initializer before ag_it
   std
::map<std::string, AccessGroup>::iterator ag_it = schema.access_groups.begin();
                                               
^
client_test
.cc:260:10: error: ag_it was not declared in this scope
   
while (ag_it != schema.access_groups.end()) {
         
^
client_test
.cc:264:25: error: ColumnFamily was not declared in this scope
   std
::map<std::string, ColumnFamily>::iterator cf_it = schema.column_families.begin();
                         
^
client_test
.cc:264:37: error: template argument 2 is invalid
   std
::map<std::string, ColumnFamily>::iterator cf_it = schema.column_families.begin();
                                     
^
client_test
.cc:264:37: error: template argument 4 is invalid
client_test
.cc:264:49: error: expected initializer before cf_it
   std
::map<std::string, ColumnFamily>::iterator cf_it = schema.column_families.begin();
                                                 
^
client_test
.cc:266:10: error: cf_it was not declared in this scope
   
while (cf_it != schema.column_families.end()) {
         
^
client_test
.cc: In function void test_async(Hypertable::Thrift::Client*, std::ostream&)’:
client_test
.cc:542:16: error: expected primary-expression before const
     foreach_ht
(const Hypertable::ThriftGen::Cell &cell, cells) {
               
^
client_test
.cc:542:62: error: foreach_ht was not declared in this scope
     foreach_ht
(const Hypertable::ThriftGen::Cell &cell, cells) {
                                                             
^
Makefile:13: recipe for target 'client_test.o' failed
make
: *** [client_test.o] Error 1


Can you please give the example for latest version?

Doug Judd

unread,
Jan 28, 2016, 9:25:27 AM1/28/16
to hypertable-user
Hi a.z,

That code example is out-of-date, and I don't think it is linked anywhere from the website.  If it is, please let me know where the link is and I'll fix it.  The latest cpp code examples can be found here:


- Doug

--
You received this message because you are subscribed to the Google Groups "Hypertable User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hypertable-us...@googlegroups.com.
To post to this group, send email to hyperta...@googlegroups.com.
Visit this group at https://groups.google.com/group/hypertable-user.
For more options, visit https://groups.google.com/d/optout.



--
Doug Judd
CEO, Hypertable Inc.
Reply all
Reply to author
Forward
0 new messages