[Qt-interest] SQLite: no functions are exported
Robert Hairgrove
evorgriahr at hispeed.ch
Fri Feb 25 18:55:10 CET 2011
On Fri, 2011-02-25 at 18:36 +0100, Thiago Macieira wrote:
> On Friday, 25 de February de 2011 17:37:42 Robert Hairgrove wrote:
> > I'm a little wary about linking directly to the SQLite library ... how
> > would I do this? It isn't safe to have both the plugin AND the sqlite3.c
> > source in my application because then I have two instances of the
> > library with all of the potential problems in memory allocation, etc.
>
> $ ldd $QTDIR/plugins/sqldrivers/libqsqlite.so
> linux-gate.so.1 => (0xffffe000)
> libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb7769000)
> [others]
>
> Don't include sqlite3.c in your program. Link to the same sqlite3 library that
> the plugin links to.
Thanks, Thiago.
This is the output of ldd on my plugin after building Qt with configure
options "-plugin-sql-sqlite" and "-no-reduce-exports". I did replace the
SQLite amalgamation source file with the newest version (3.7.5),
although it should be compatible with the one shipping with Qt 4.7.1
(AFAICT):
======================================
bob at bobubuntu:~$ ldd /usr/local/Trolltech/Qt-4.7.1/plugins/sqldrivers/libqsqlite.so
linux-gate.so.1 => (0x002a2000)
libQtSql.so.4 => /usr/local/Trolltech/Qt-4.7.1/lib/libQtSql.so.4 (0x00784000)
libQtCore.so.4 => /usr/local/Trolltech/Qt-4.7.1/lib/libQtCore.so.4 (0x002a3000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x00110000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00129000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x0021f000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00d6f000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x0057e000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00771000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00245000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0x0024b000)
libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x007c9000)
/lib/ld-linux.so.2 (0x00ebd000)
libpcre.so.3 => /lib/libpcre.so.3 (0x00254000)
======================================
Hmmm...
More information about the Qt-interest-old
mailing list