[odb-users] Create schema error (unknown database schema '')
2017-08-06 23:05
162 查看
Boris Kolpackov boris at codesynthesis.com
Fri May 31 11:13:02 EDT 2013
Previous message: [odb-users] Create schema error (unknown database schema '')
Next message: [odb-users] Create schema error (unknown database schema '')
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Previous message: [odb-users] Create schema error (unknown database schema '')
Next message: [odb-users] Create schema error (unknown database schema '')
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
from:http://www.codesynthesis.com/pipermail/odb-users/2013-May/001299.html
Fri May 31 11:13:02 EDT 2013
Previous message: [odb-users] Create schema error (unknown database schema '')
Next message: [odb-users] Create schema error (unknown database schema '')
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
Previous message: [odb-users] Create schema error (unknown database schema '')
Next message: [odb-users] Create schema error (unknown database schema '')
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
from:http://www.codesynthesis.com/pipermail/odb-users/2013-May/001299.html
相关文章推荐
- Create schema error (unknown database schema '')
- 转!sqlite3.OperationalError) no such table- users [SQL- 'SELECT users.id AS users_id, users.email AS u
- Delphi 2006-2010 error: “Cannot create file C:\Users\Admin\AppData\Local\Temp\EditorLineEnds.ttr”
- Got error 241 'Invalid schema
- Error:Failed to create directory 'C:\Users\user\.gradle\caches\2.10\scripts\ijinit6_904ystmpz5u5lc7u
- [ERROR] Unable to read and import the source file : 'C:\Users\Administrator\.hudson\jobs\Deeplan\wor
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- java.lang.OutOfMemoryError: unable to create new native thread解决方法
- Install:Wrapper.CreateFile failed with error 123:文件名、目录名或卷标语法不正确
- ERROR: Unknown command 'crunch' 解决方法
- Server Error in '/' Application. 报错
- configure: error: C++ compiler cannot create executables
- Java出错 Error:Could not create the Java Virtual Machine Error:A fatal exception has occurred
- mips交叉编译 error: 'PTHREAD_MUTEX_ERRORCHECK_NP' was not declared in this scope
- django TypeError: 'module' object is not callable
- Error:CreateProcess error=216, 该版本的 %1 与您运行的 Windows 版本不兼容。请查看计算机的系统信息,了解是否需要 x86 (32 位)或 x64 (64 位)
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- MySQL 出现 ERROR 1396 (HY000): Operation CREATE USER failed for ‘xxx’ 问题的解决方法
- Error: cannot open C:\Users\(用户名)\AppData\Local\Temp\internaljobs.obj.5628.140.jom for write
- pywintypes.com_error: (-2147221008, '尚未调用 CoInitialize。', None, None)