jeudi 2 juillet 2015

Linking sqlite library with kore web server

I am using kore webserver (https://kore.io/).

I am trying to link sqlite3 library with kore app as specified here (http://ift.tt/1GQhlNY)

I created an sqlite lib with the following commands

$ gcc -o sqlite3.o sqlite3.c shell.c 
$ libtool -static -o libsqlite3.a sqlite3.o

then I ran kore build with the library linked using LDFLAGS as mentioned here (http://ift.tt/1GQhlNY)

 $  env LDFLAGS="-L/Users/prakash-2282/Downloads/sqlite-amalgamation-201506301510 -lsqlite3"  kore build

It gives me an error as follows:

ld: warning: ignoring file /Users/prakash-2282/Downloads/sqlite-amalgamation-201506301510/libsqlite3.a, file was built for archive which is not the architecture being linked (x86_64): /Users/prakash-2282/Downloads/sqlite-amalgamation-201506301510/libsqlite3.a myapp built succesfully!

I also tried these two variants for compiling sqlite

gcc -arch x86_64 -o sqlite3.o sqlite3.c shell.c 
gcc -m32  -o sqlite3.o sqlite3.c shell.c

But i get the same error as above.

Can you please help me resolve this ?

Aucun commentaire:

Enregistrer un commentaire