hi,
I found some mistakes in my code and fixed them. However, I can't
figure out where is the problem. I included new patch for my changes as
well as log from the compiler. Could someone take a look?
Thanks.


-- 
- Pavlo Solntsev
---------------------------------------------
Sent from Evolution on GNU/Debian <www.debian.org> id="-x-evo-
selection-start-marker">

diff --git a/libgda/src/serveroperation.ccg b/libgda/src/serveroperation.ccg
index 7062331..c2b35ff 100644
--- a/libgda/src/serveroperation.ccg
+++ b/libgda/src/serveroperation.ccg
@@ -77,6 +77,24 @@ void ServerOperation::set_value_at_as_value(const Glib::ustring& path, const Gli
     ::Glib::Error::throw_exception(gerror);
 }
 
+static Glib::RefPtr<ServerOperation> prepare_create_table(Glib::RefPtr<Connection> &cnc, 
+                                                          const Glib::ustring &table_name,
+                                                          std::vector<GdaServerOperationCreateTableArg> &arguments)
+{
+    GError* gerror = 0;
+    Glib::RefPtr<ServerOperation> op =
+    Glib::wrap(gda_server_operation_prepare_create_table(
+                cnc.operator->()->gobj(), 
+                table_name.c_str(),
+                Glib::ListHandler<GdaServerOperationCreateTableArg>::vector_to_list(arguments).data(),
+                &gerror)
+            );   
+
+  if(gerror) ::Glib::Error::throw_exception(gerror);
+
+  return op;
+}
+
 } /* namespace Gda */
 
 } /* namespace Gnome */
diff --git a/libgda/src/serveroperation.hg b/libgda/src/serveroperation.hg
index 079651d..fce01e8 100644
--- a/libgda/src/serveroperation.hg
+++ b/libgda/src/serveroperation.hg
@@ -68,6 +68,11 @@ public:
   static Glib::RefPtr<ServerOperation> prepare_drop_database(const Glib::ustring& provider,
                                                              const Glib::ustring& db_name);
 
+  
+   static Glib::RefPtr<ServerOperation> prepare_create_table(Glib::RefPtr<Connection> &cnc, 
+                                                             const Glib::ustring &table_name,
+                                                             std::vector<GdaServerOperationCreateTableArg> &arguments);
+
   _WRAP_METHOD(void perform_create_table(), gda_server_operation_perform_create_table, errthrow)
   _WRAP_METHOD(void perform_drop_database(const Glib::ustring& provider), gda_server_operation_perform_drop_database, errthrow)
   _WRAP_METHOD(void perform_create_database(const Glib::ustring& provider), gda_server_operation_perform_create_database, errthrow)
/bin/bash ../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H   -I.. -I/home/pavlo/jhbuild/checkout/libgdamm/libgda -I../.. -DG_LOG_DOMAIN=\"libgdamm\" -DLIBGDAMM_BUILD=1 -pthread -I/home/pavlo/jhbuild/install/include/glibmm-2.54 -I/home/pavlo/jhbuild/install/lib/glibmm-2.54/include -I/home/pavlo/jhbuild/install/include/sigc++-3.0 -I/home/pavlo/jhbuild/install/lib/sigc++-3.0/include -I/home/pavlo/jhbuild/install/include/libgda-6.0 -I/home/pavlo/jhbuild/install/include/libgda-6.0/libgda -I/home/pavlo/jhbuild/install/include/glib-2.0 -I/home/pavlo/jhbuild/install/lib/glib-2.0/include -I/usr/include/libxml2  -Wall -g -O2 -MT serveroperation.lo -MD -MP -MF .deps/serveroperation.Tpo -c -o serveroperation.lo /home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I.. -I/home/pavlo/jhbuild/checkout/libgdamm/libgda -I../.. -DG_LOG_DOMAIN=\"libgdamm\" -DLIBGDAMM_BUILD=1 -pthread -I/home/pavlo/jhbuild/install/include/glibmm-2.54 -I/home/pavlo/jhbuild/install/lib/glibmm-2.54/include -I/home/pavlo/jhbuild/install/include/sigc++-3.0 -I/home/pavlo/jhbuild/install/lib/sigc++-3.0/include -I/home/pavlo/jhbuild/install/include/libgda-6.0 -I/home/pavlo/jhbuild/install/include/libgda-6.0/libgda -I/home/pavlo/jhbuild/install/include/glib-2.0 -I/home/pavlo/jhbuild/install/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -g -O2 -MT serveroperation.lo -MD -MP -MF .deps/serveroperation.Tpo -c /home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc  -fPIC -DPIC -o .libs/serveroperation.o
In file included from /home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm.h:142:0,
                 from /home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc:4:
/home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/vectorutils.h: In instantiation of ‘Glib::Container_Helpers::GListKeeper<Tr>::~GListKeeper() [with Tr = Glib::Container_Helpers::TypeTraits<_GdaServerOperationCreateTableArg>]’:
/home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc:98:94:   required from here
/home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/vectorutils.h:859:28: error: invalid use of incomplete type ‘using CTypeNonConst = using CTypeNonConst = struct _GdaServerOperationCreateTableArg {aka struct _GdaServerOperationCreateTableArg}’
         Tr::release_c_type(static_cast<CTypeNonConst>(node->data));
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pavlo/jhbuild/install/include/libgda-6.0/libgda/gda-server-provider.h:30:0,
                 from /home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.h:34,
                 from /home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc:6:
/home/pavlo/jhbuild/install/include/libgda-6.0/libgda/gda-server-operation.h:255:16: note: forward declaration of ‘using CTypeNonConst = using CTypeNonConst = struct _GdaServerOperationCreateTableArg {aka struct _GdaServerOperationCreateTableArg}’
 typedef struct _GdaServerOperationCreateTableArg GdaServerOperationCreateTableArg;
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm.h:142:0,
                 from /home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc:4:
/home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/vectorutils.h:859:28: error: invalid use of incomplete type ‘using CTypeNonConst = using CTypeNonConst = struct _GdaServerOperationCreateTableArg {aka struct _GdaServerOperationCreateTableArg}’
         Tr::release_c_type(static_cast<CTypeNonConst>(node->data));
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pavlo/jhbuild/install/include/libgda-6.0/libgda/gda-server-provider.h:30:0,
                 from /home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.h:34,
                 from /home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc:6:
/home/pavlo/jhbuild/install/include/libgda-6.0/libgda/gda-server-operation.h:255:16: note: forward declaration of ‘using CTypeNonConst = using CTypeNonConst = struct _GdaServerOperationCreateTableArg {aka struct _GdaServerOperationCreateTableArg}’
 typedef struct _GdaServerOperationCreateTableArg GdaServerOperationCreateTableArg;
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm.h:142:0,
                 from /home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc:4:
/home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/vectorutils.h: In instantiation of ‘GList* Glib::Container_Helpers::create_glist(typename std::vector<typename Tr::CppType>::const_iterator, typename std::vector<typename Tr::CppType>::const_iterator) [with Tr = Glib::Container_Helpers::TypeTraits<_GdaServerOperationCreateTableArg>; GList = _GList; typename std::vector<typename Tr::CppType>::const_iterator = __gnu_cxx::__normal_iterator<const _GdaServerOperationCreateTableArg*, std::vector<_GdaServerOperationCreateTableArg> >]’:
/home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/vectorutils.h:976:67:   required from ‘static Glib::ListHandler<T, Tr>::GListKeeperType Glib::ListHandler<T, Tr>::vector_to_list(const VectorType&) [with T = _GdaServerOperationCreateTableArg; Tr = Glib::Container_Helpers::TypeTraits<_GdaServerOperationCreateTableArg>; Glib::ListHandler<T, Tr>::GListKeeperType = Glib::Container_Helpers::GListKeeper<Glib::Container_Helpers::TypeTraits<_GdaServerOperationCreateTableArg> >; Glib::ListHandler<T, Tr>::VectorType = std::vector<_GdaServerOperationCreateTableArg>]’
/home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc:98:70:   required from here
/home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/vectorutils.h:130:41: error: invalid use of incomplete type ‘using CType = struct _GdaServerOperationCreateTableArg {aka struct _GdaServerOperationCreateTableArg}’
     const void* const item(Tr::to_c_type(*&*--pend));
                            ~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /home/pavlo/jhbuild/install/include/libgda-6.0/libgda/gda-server-provider.h:30:0,
                 from /home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.h:34,
                 from /home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc:6:
/home/pavlo/jhbuild/install/include/libgda-6.0/libgda/gda-server-operation.h:255:16: note: declaration of ‘using CType = struct _GdaServerOperationCreateTableArg {aka struct _GdaServerOperationCreateTableArg}’
 typedef struct _GdaServerOperationCreateTableArg GdaServerOperationCreateTableArg;
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/object.h:35:0,
                 from /home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/binding.h:22,
                 from /home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm.h:91,
                 from /home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc:4:
/home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/containerhandle_shared.h: In instantiation of ‘static Glib::Container_Helpers::TypeTraits<T>::CType Glib::Container_Helpers::TypeTraits<T>::to_c_type(const CppType&) [with T = _GdaServerOperationCreateTableArg; Glib::Container_Helpers::TypeTraits<T>::CType = _GdaServerOperationCreateTableArg; Glib::Container_Helpers::TypeTraits<T>::CppType = _GdaServerOperationCreateTableArg]’:
/home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/vectorutils.h:130:41:   required from ‘GList* Glib::Container_Helpers::create_glist(typename std::vector<typename Tr::CppType>::const_iterator, typename std::vector<typename Tr::CppType>::const_iterator) [with Tr = Glib::Container_Helpers::TypeTraits<_GdaServerOperationCreateTableArg>; GList = _GList; typename std::vector<typename Tr::CppType>::const_iterator = __gnu_cxx::__normal_iterator<const _GdaServerOperationCreateTableArg*, std::vector<_GdaServerOperationCreateTableArg> >]’
/home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/vectorutils.h:976:67:   required from ‘static Glib::ListHandler<T, Tr>::GListKeeperType Glib::ListHandler<T, Tr>::vector_to_list(const VectorType&) [with T = _GdaServerOperationCreateTableArg; Tr = Glib::Container_Helpers::TypeTraits<_GdaServerOperationCreateTableArg>; Glib::ListHandler<T, Tr>::GListKeeperType = Glib::Container_Helpers::GListKeeper<Glib::Container_Helpers::TypeTraits<_GdaServerOperationCreateTableArg> >; Glib::ListHandler<T, Tr>::VectorType = std::vector<_GdaServerOperationCreateTableArg>]’
/home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc:98:70:   required from here
/home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/containerhandle_shared.h:77:16: error: return type ‘using CType = struct _GdaServerOperationCreateTableArg {aka struct _GdaServerOperationCreateTableArg}’ is incomplete
   static CType to_c_type(const CppType& item) { return item; }
                ^~~~~~~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/6/memory:62,
                 from /home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/refptr.h:23,
                 from /home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/balancedtree.h:24,
                 from /home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm.h:87,
                 from /home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc:4:
/usr/include/c++/6/bits/stl_iterator.h: In instantiation of ‘__gnu_cxx::__normal_iterator<_Iterator, _Container>& __gnu_cxx::__normal_iterator<_Iterator, _Container>::operator--() [with _Iterator = const _GdaServerOperationCreateTableArg*; _Container = std::vector<_GdaServerOperationCreateTableArg>]’:
/home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/vectorutils.h:130:45:   required from ‘GList* Glib::Container_Helpers::create_glist(typename std::vector<typename Tr::CppType>::const_iterator, typename std::vector<typename Tr::CppType>::const_iterator) [with Tr = Glib::Container_Helpers::TypeTraits<_GdaServerOperationCreateTableArg>; GList = _GList; typename std::vector<typename Tr::CppType>::const_iterator = __gnu_cxx::__normal_iterator<const _GdaServerOperationCreateTableArg*, std::vector<_GdaServerOperationCreateTableArg> >]’
/home/pavlo/jhbuild/install/include/glibmm-2.54/glibmm/vectorutils.h:976:67:   required from ‘static Glib::ListHandler<T, Tr>::GListKeeperType Glib::ListHandler<T, Tr>::vector_to_list(const VectorType&) [with T = _GdaServerOperationCreateTableArg; Tr = Glib::Container_Helpers::TypeTraits<_GdaServerOperationCreateTableArg>; Glib::ListHandler<T, Tr>::GListKeeperType = Glib::Container_Helpers::GListKeeper<Glib::Container_Helpers::TypeTraits<_GdaServerOperationCreateTableArg> >; Glib::ListHandler<T, Tr>::VectorType = std::vector<_GdaServerOperationCreateTableArg>]’
/home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc:98:70:   required from here
/usr/include/c++/6/bits/stl_iterator.h:811:2: error: cannot decrement a pointer to incomplete type ‘const _GdaServerOperationCreateTableArg’
  --_M_current;
  ^~~~~~~~~~~~
/home/pavlo/jhbuild/checkout/libgdamm/libgda/libgdamm/serveroperation.cc:89:38: warning: ‘Glib::RefPtr<Gnome::Gda::ServerOperation> Gnome::Gda::prepare_create_table(Glib::RefPtr<Gnome::Gda::Connection>&, const Glib::ustring&, std::vector<_GdaServerOperationCreateTableArg>&)’ defined but not used [-Wunused-function]
 static Glib::RefPtr<ServerOperation> prepare_create_table(Glib::RefPtr<Connection> &cnc,
                                      ^~~~~~~~~~~~~~~~~~~~
Makefile:599: recipe for target 'serveroperation.lo' failed

_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to