You have to link against sqlite's shared lib, e.g. in linux

$ gcc -L/path/to/sqlite/stuffs -I/path/to/sqlite/stuffs -lsqlite prog.c

(the 2nd is a capital i, the 3rd a small L)

Cheers,
M. Manese

On 4/4/07, nshaw <[EMAIL PROTECTED]> wrote:

I upgraded from 3.3.1.3 to 3.3.1.4.  Up till now, I've been experimenting
with SQLite3 via the CLP.  Now, I'm trying to access a DB via a C program
but I'm getting errors.  Here's a small code fragment:

#include <stdio.h>
#include <stdlib.h>
#include "sqlite3.h"

int main (int argc, char **argv)
{
    sqlite3 *db;     /* from "the definitive guide to sqlite */

    char *zErr;
    int rc;
    char *sql;

    rc = sqlite3_open ("Family.db", &db);

    return 0;
}

The error I get is (.text+0x16): undefined reference to 'sqlite3_open'.

Any help will be greatly appreciated.
Thanks,

Nick.

--
View this message in context: 
http://www.nabble.com/Newbee-Question-tf3521982.html#a9825045
Sent from the SQLite mailing list archive at Nabble.com.


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to