Boris Kolpackov Boris at codesynthesis.com
Fri 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 daysago:http://www.codesynthesis.com/pipermail/odb-users/20 13-may/001286.htmlbecause your application doesn ' t directly reference any symbols FROMLIBRARY-ODB.CXX, the linker ignores LIBRARY-ODB.O from LIBRARY.A. The ASA result of the schema creation Code does not end with the executable. Normally this isn't a problem since most application Executableswill also include code that persists objects, etc, which Willforce the linker to include all the object files from the library. In your test, however, and all of you are create the schema. As Mentionedin the above email, with GNU ld you can use the--whole-archiveoption to force the linker to include every obj ECT file from Yourstatic library:>$ g++-o test2 main.o library.a-lodb-sqlite-lodbg++-o test2 main.o-wl,-whole-archive library.a-wl,-no-whole-archive-lodb-sqlite-lodbanother thing that's may find u Seful is the ' separate ' value forthe--schema-format option. It would trigger the generation of Theschema creation code as a separate C + + source file (library-schema.cxx). You can then perhaps link it directly to your executable instead ofpackaging it into a static library. See the ODB compiler command Linedocumentation (mans 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
[Odb-users] Create schema Error (Unknown database schema ")