D. Kettler said:

> When I add the -static flag to my g++ command it gives me 'undefined
> reference to' errors for every instance where I attempt to use a sqlite
> function.
>
> This is on a Debian (testing) system and yes I have both libsqlite3 and
> libsqlite3-dev installed.  There are libsqlite3.a, libsqlite3.la, and
> libsqlite3.so files in /usr/lib/
>
> I also tried giving the path to the libsqlite3.a file explicitly, but it
> works no better.

David,

Static linking is a major pain in the tail.  Everything is dependent upon
the order that libraries are listed on the linker command line.  If
something in a module that appears after -lsqlite3 references sqlite3, you
won't get the symbol resolved by the linker.

What's your link command line (the one that contains -lsqlite3)?  That may
help us out quite a bit.  The earlier bits about #define are malarkey and
only relevant to win32 programmers.  They have a notion of private and
public members for shared libraries that doesn't apply in the UNIX world.

Clay Dowling
-- 
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development

Reply via email to