Keiichi McGuire wrote:
Hi everyone,
I'm still a bit new to sqlite and also to crosscompiling programs.
I've been having problems with being able to compile this test c program
that should just connect to the database.
My program looks like this:
#include<stdio.h>
#include"sqlite.h>
int main()
{
printf("Hello!\n");
sqlite *db;
char errMsg;
errMsg = NULL;
db = sqlite_open("sqlitetest",0660,&errMsg);
return 0;
}
and I get the following error:
[EMAIL PROTECTED] dev]# arm-linux-gcc test.c -o test4 -L
/home/kmcgui/sqlite-arm/.lib
s/ -lsqlite tesc: In function `main':
test.c:9: warning: assignment makes integer from pointer without a cast
test.c:11: warning: pabssing arg 3 of qlite_open' from incompatible pointer
type
/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3l.3.2/../../../.m-linux/biin/ld:
skipping mpatible /home/kmcgui/sqlite-arm/.flibs//libsqliteso when
senarching for
-ls/local/armi/3.3.2/lib/gcc-e/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld:
skipping incompatible
/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/libsqlite.a when
searlching
for -lsqle
/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld:
cannot find -lsqlite
collect2: ld rxeturned 1 exit s
thank you in advance!!!
-Keiichi
Try declaring errMsg as a character array rather than a character,
char errMsg[256];
Arg3 3 of sqlite_open is of type char **.
Note that you are using Sqlite V2. If you are starting a new project
you might find using Sqlite V3 from the beginning a good idea.