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 '')的更多相关文章

  1. Create schema error (unknown database schema '')

    Andrey Devyatka 4 years ago Permalink Raw Message Hi,Please tell me, can I use the static library in ...

  2. Could not update Activiti database schema: unknown version from database: '5.20.0.1'

    转: Could not update Activiti database schema: unknown version from database: '5.20.0.1' 2017年11月22日 ...

  3. database schema

    数据中有4个Schema无法被删除 ● dbo, 具有db_owner或者db_ddl_admin 的用户,新创建对象默认schema就是dbo ● guest , 用来给guest 用户使用,这个s ...

  4. SQL Server中删除用户时报错,提示:The database principal owns a schema in the database, and cannot be dropped(转载)

    Description of the problem: When you tried to drop a user, you got this message: Error: 15138 The da ...

  5. HiveSQLException: Error while compiling statement: No privilege 'Create' found for outputs { database:default }

    今天用Hive的JDBC实例时出现了HiveSQLException: Error while compiling statement: No privilege 'Create' found for ...

  6. MySQL的登陆错误:ERROR 1049 (42000): Unknown database 'root'

    当初刚装MySQL的时候,到网上查的命令行登陆MySQL的方法都是mysql -u root -p password mysql -r root -p 123456 但是奇怪的是这条命令我输进去死活都 ...

  7. org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown database 'jdsc')

    org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown databas ...

  8. mysqldump: [ERROR] unknown variable 'database=test'.

    背景: 导出数据库test库的test表数据出现报错信息:mysqldump: [ERROR] unknown variable 'database=test'. 原来是my.cnf参数文件配置了以下 ...

  9. [笔记] MySql Workbench 导出表结构和数据报错 mysqldump: [ERROR] unknown variable 'delayed-insert=FALSE'

    下午使用MySql Workbench导出数据库表结构,设置完导出选项后执行导出,报如下错误: :: Dumping nacweixindb (tb_app) Running: mysqldump.e ...

随机推荐

  1. Volume 1. Big Number(uva)

    如用到bign类参见大整数加减乘除模板 424 - Integer Inquiry #include <iostream> #include <string> #include ...

  2. Python中接收用户的输入

    一.如何去接收用户的输入?使用函数 input() 函数 input() 让程序暂停运行,等待用户输入一些文本,获取用户的输入后,Python将其存储到一个变量中,以方便后期使用. name = in ...

  3. UVA 230 Borrowers (STL 行读入的处理 重载小于号)

    题意: 输入若干书籍和作者名字,然后先按作者名字升序排列,再按标题升序排列,然后会有3种指令,BORROW,RETURN, SHELVE. BORROW 和 RETURN 都会带有一个书名在后面,如: ...

  4. [luoguP1388] 算式(DP)

    传送门 看这个n<=15本以为是个状压DP 还是too young 这个题最神奇的地方是加括号是根据贪心的策略. 发现只有在一连串的加号两边加上括号才是最优的(想一想,为什么?) f[i][j] ...

  5. noip模拟赛 写代码

    分析:这其实就是括号匹配题,一眼贪心题,不过一开始贪错了,以为([)]是合法的......其实括号之间不能嵌套. 一开始的想法是尽量往左边填左括号,因为每种括号的数量都确定了,那么左括号和右括号的数量 ...

  6. noip模拟赛 区间

    分析:要遍历所有的区间,肯定是枚举左端点,然后再枚举右端点.关键是怎么高效地求区间&,|,一般而言是用前缀和的,但是&,|不满足区间可减性,所以可以考虑线段树?这道题不带修改操作,用线 ...

  7. CodeForces788B 欧拉路

    B. Weird journey time limit per test 2 seconds memory limit per test 256 megabytes input standard in ...

  8. Intent使用Parcelable传递对象

    package com.pingyijinren.test; import android.os.Parcel; import android.os.Parcelable; import java.i ...

  9. hdu - 2266 How Many Equations Can You Find (简单dfs)

    http://acm.hdu.edu.cn/showproblem.php?pid=2266 给一个字符串和一个数n,在字符串中间可以插入+或者 -,问有多少种等于n的情况. 要注意任意两个数之间都可 ...

  10. Less Time, More profit 最大权闭合子图(最大流最小割)

    The city planners plan to build N plants in the city which has M shops. Each shop needs products fro ...