[odb-users] Create schema error (unknown database schema '')

Boris Kolpackov boris at codesynthesis.com
Fri May 31 11:13:02 EDT 2013


Hi Andrey,

Andrey Devyatka <an9bit at gmail.com> writes:

> Please tell me, can I use the static library in the following case:
>> [...]

This is exactly the same issue that we‘ve discussed just a few days
ago:

http://www.codesynthesis.com/pipermail/odb-users/2013-May/001286.html

Because your application doesn‘t directly reference any symbols from
library-odb.cxx, the linker ignores library-odb.o from library.a. As
a result the schema creation code does not end up in the executable.

Normally this is not a problem since most application executables
will also include code that persists objects, etc., which will
force the linker to include all the object files from the library.

In your test, however, all you do is create the schema. As mentioned
in the above email, with GNU ld you can use the --whole-archive
option to force the linker to include every object file from your
static library:

> $ g++ -o test2 main.o library.a -lodb-sqlite -lodb

g++ -o test2 main.o -Wl,-whole-archive library.a -Wl,-no-whole-archive -lodb-sqlite -lodb

Another thing that you may find useful is the ‘separate‘ value for
the --schema-format option. It will trigger the generation of the
schema creation code as a separate C++ source file (library-schema.cxx).
You can then perhaps link it directly to your executable instead of
packaging it into a static library. See the ODB compiler command line
documentation (man pages) for more information on this option.

Boris

from:http://www.codesynthesis.com/pipermail/odb-users/2013-May/001299.html

[odb-users] Create schema error (unknown database schema '')

时间: 2024-08-24 20:39:27

[odb-users] Create schema error (unknown database schema '')的相关文章

Create schema error (unknown database schema &#39;&#39;)

Andrey Devyatka 4 years ago Permalink Raw Message Hi,Please tell me, can I use the static library in the following case: library.hpp:#ifndef _CPP_ODB_STATIC_LIBRARY_CPP_#define _CPP_ODB_STATIC_LIBRARY_CPP_#include <odb/database.hxx>odb::database* cr

HiveSQLException: Error while compiling statement: No privilege &#39;Create&#39; found for outputs { database:default }

今天用Hive的JDBC实例时出现了HiveSQLException: Error while compiling statement: No privilege 'Create' found for outputs { database:default }的错误,日志如下. org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: No privilege 'Create' found for

MySQL的登陆错误:ERROR 1049 (42000): Unknown database &#39;root&#39;

刚刚装上数据库的时候,直接按照这个格式就登陆上去了,突然莫名其妙登陆不上去了 但是现在突然死活登陆不上去了 于是拿着这个报错信息在网上找啊找,终于找了了错误的原因 -p和密码是连在一起的,赶紧一试,果然可以登陆! 问题解决. ps:-r后面可以紧跟用户名,也可以加个空格,但密码后面一定不能加空格. MySQL的登陆错误:ERROR 1049 (42000): Unknown database 'root' 原文地址:https://www.cnblogs.com/weidu/p/10056547

[笔记] MySql Workbench 导出表结构和数据报错 mysqldump: [ERROR] unknown variable &#39;delayed-insert=FALSE&#39;

下午使用MySql Workbench导出数据库表结构,设置完导出选项后执行导出,报如下错误: 16:22:40 Dumping nacweixindb (tb_app) Running: mysqldump.exe --defaults-file="c:\users\admini~1\appdata\local\temp\tmpswfutq.cnf" --delayed-insert=FALSE --host=localhost --protocol=tcp --user=root

Mybatis报错 Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating class com.me.mybatis.pojo.Orders with invalid types () or values ().

在学mybaits的时候遇到了这个错误,而且卡住了我三个小时也找不到,最后分析出来不能初始化类,然后就结合着之前自己以前的一点经验发现只有有参构造没有无参构造,因此只需要添加上无参构造就可以了. 错误源码 org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: Error ins

Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for &hellip;

编译通过并且运行web成功后,访问的页面不需要连接数据库,不牵扯到反射调用实体类就不会报错, 报错内容如下: [WARNING] org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exce

PGI安装时出现ERROR: unknown glibc version (2.4),的解决方法

本人在安装PGI时出现ERROR: unknown glibc version (2.4)的错误,经过网友的指教,终于成功完成安装. 看着PGI能顺利工作,心里确实很爽,在这里也把自己的一点所获与大家分享. 以本人所用的PGI-7.1.4为例,第一次安装后出现上述错误,但是发现此时PGI文件已经被成功写入指定的区域了,然后在安装路径下(本人使用/home/name/pgi/)下找到/linux86/7.1/中的makelocal文件,打开后按以下方式更改: 修改后的makelocalrc如下(修

Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;ItemsCustom&#39; in &#39;class com.pojo.OrderDetailCustom

再用 junit 测试MyBatis时发现的错误: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'ItemsCustom' in 'class com.pojo.OrderDetailCust

Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection;

解决报错 This application has no explicit mapping for /error, so you are seeing this as a fallback. Tue Jan 07 21:06:43 CST 2020 There was an unexpected error (type=Internal Server Error, status=500). nested exception is org.apache.ibatis.exceptions.Pers