[odb-users] Question about packaging the generated code for each database into a separate dynamic-link library

Marcos Gonzalez Menendez marcos.glez at gmail.com
Fri Aug 22 12:38:57 EDT 2014


Thanks a lot for your help. I'll try to adapt the example to my needs.

Marcos


2014-08-18 13:03 GMT+02:00 Boris Kolpackov <boris at codesynthesis.com>:

> Hi Marcos,
>
> Marcos Gonzalez Menendez <marcos.glez at gmail.com> writes:
>
> > I have the followind doubts:
>
> I am kind of surprised since the above paragraph answers all (well,
> most of) these questions directly:
>
>
> > - Does person.dll contain only person-odb.* code?
>
> Yes: "placing person-odb.cxx and person.cxx into person.dll"
>
>
> > - Does person.dll export any symbol?
>
> Yes, your executable will use the API provided by person.hxx and
> person-odb.hxx, so you have to export their symbols.
>
>
> > - Does person-sqlite.dll contain only person-odb-sqlite.* code?
>
> Yes: "placing [...], person-odb-sqlite.cxx into person-sqlite.dll"
>
>
> > - Does person-sqlite.dll export any symbol?
>
> It depends: "Note that in the pure dynamic multi-database support,
> person-sqlite.dll and person-pgsql.dll do not export any symbols."
> So, if you don't need to "drop down" to static SQLite API, then
> you don't need to export any symbols from this DLL.
>
>
> > - Does person-sqlite.dll ling to person.dll?
>
> Yes: "... person-sqlite.dll and person-pgsql.dll, which both link to
> person.dll"
>
>
> > - Does person.exe need a LoadLibrary call for loading person-sqlite.dll?
>
> Yes.
>
>
> > Coudl you give me an example of this?
>
> There is an internal test that we use to test various multi-database
> setups. You can use it as a reference though note that it has some
> extra macros that select a particular configuration that you won't
> need (and that may make undestanding what's going on a bit trciky).
> The ODB command lines that were used to generate the *-odb files
> are in the README file.
>
> http://codesynthesis.com/~boris/tmp/odb/multi-db.zip
>
> Boris
>



-- 
Marcos González Menéndez


More information about the odb-users mailing list