在QtCreator中使用odb构建问题

时间:2015-04-09 22:16:34

标签: c++ qt qt-creator odb

我想在sql中使用QtCreatorQt libary制作ORM libary ODB个应用,但是当我尝试从ODB构建Hello示例时网站我只得到一个错误列表,我找不到问题。

我的想法是,他们缺少一些包含或我没有正确安装。

构建错误:

"
..\test\main.cxx:40:15: error: cannot convert 'odb::access::object_traits<person>::id_type' to 'long unsigned int' in assignment "

..\test\main.cxx:42:14: error: cannot convert 'odb::access::object_traits<person>::id_type' to 'long unsigned int' in assignment

In file included from C:/Qt/Qt5.4.0/Tools/mingw491_32/i686-w64-mingw32/include/odb/database.hxx:26:0,
                 from ..\test\main.cxx:8:
C:/Qt/Qt5.4.0/Tools/mingw491_32/i686-w64-mingw32/include/odb/query.hxx: In instantiation of 'struct odb::query_selector<person, (odb::database_id)5u>':
..\test\main.cxx:47:30:   required from here

C:/Qt/Qt5.4.0/Tools/mingw491_32/i686-w64-mingw32/include/odb/query.hxx:104:10: error: invalid use of incomplete type 'struct odb::query_selector_impl<person, (odb::database_id)5u, (odb::class_kind)2u>'
   struct query_selector: query_selector_impl<T, DB, class_traits<T>::kind>

C:/Qt/Qt5.4.0/Tools/mingw491_32/i686-w64-mingw32/include/odb/query.hxx:84:10: error: declaration of 'struct odb::query_selector_impl<person, (odb::database_id)5u, (odb::class_kind)2u>'
   struct query_selector_impl;

..\test\main.cxx:47:30: error: no type named 'base_type' in 'struct odb::query_selector<person, (odb::database_id)5u>'
     typedef odb::query<person> query;

In file included from C:/Qt/Qt5.4.0/Tools/mingw491_32/i686-w64-mingw32/include/odb/prepared-query.hxx:12:0,
                 from C:/Qt/Qt5.4.0/Tools/mingw491_32/i686-w64-mingw32/include/odb/database.hxx:27,
                 from ..\test\main.cxx:8:
C:/Qt/Qt5.4.0/Tools/mingw491_32/i686-w64-mingw32/include/odb/result.hxx: In instantiation of 'class odb::result<person>':
..\test\main.cxx:55:17:   required from here
C:/Qt/Qt5.4.0/Tools/mingw491_32/i686-w64-mingw32/include/odb/result.hxx:75:9: error: invalid use of incomplete type 'class odb::result_base<person, (odb::class_kind)2u>'
   class result: result_base<T, class_traits<T>::kind> "

此错误列表要长得多,因此请链接到项目文件和errors的完整列表。

0 个答案:

没有答案