Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Sako Youssouf
compilation with Sqlite in C program On 4/12/2012 11:07 AM, Sako Youssouf wrote: > Here my step and the result. > > # gcc -c sqlite3.c > # ar -rvs libsqlite3.a sqlite3.o > ar: creating libsqlite3.a > a - sqlite3.o > > # gcc -L. -lsqlite -L/usr/lib/ -ldl -lpthread -o comp

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
On Thu, Apr 12, 2012 at 6:07 PM, Sako Youssouf < youssouf.s...@renault-trucks.com> wrote: > # ar -rvs libsqlite3.a sqlite3.o > # gcc -L. -lsqlite -L/usr/lib/ -ldl -lpthread -o compil compil.c > You're back to the first problem you had: linking against /usr/lib/libsqlite.* -- - stephan beal

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Robert Myers
On 4/12/2012 11:07 AM, Sako Youssouf wrote: Here my step and the result. # gcc -c sqlite3.c # ar -rvs libsqlite3.a sqlite3.o ar: creating libsqlite3.a a - sqlite3.o # gcc -L. -lsqlite -L/usr/lib/ -ldl -lpthread -o compil compil.c Here's your problem. You want -lsqlite3 /tmp/ccfdSnPR.o: In

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Sako Youssouf
Here my step and the result. # gcc -c sqlite3.c # ar -rvs libsqlite3.a sqlite3.o ar: creating libsqlite3.a a - sqlite3.o # gcc -L. -lsqlite -L/usr/lib/ -ldl -lpthread -o compil compil.c /tmp/ccfdSnPR.o: In function `main': compil.c:(.text+0xc3): undefined reference to `sqlite3_open'

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Black, Michael (IS)
.org [mailto:sqlite-users-boun...@sqlite.org] De la part de Black, Michael (IS) Envoyé : jeudi 12 avril 2012 17:17 À : General Discussion of SQLite Database Objet : Re: [sqlite] error compilation with Sqlite in C program You're missing a step in your library build. ranlib libsqlite.a Michae

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Sako Youssouf
À : General Discussion of SQLite Database Objet : Re: [sqlite] error compilation with Sqlite in C program On Thu, Apr 12, 2012 at 5:31 PM, Sako Youssouf < youssouf.s...@renault-trucks.com> wrote: > Others ideas? > Can you paste in the last thing (or two) you tried? You might also tr

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
On Thu, Apr 12, 2012 at 5:31 PM, Sako Youssouf < youssouf.s...@renault-trucks.com> wrote: > Others ideas? > Can you paste in the last thing (or two) you tried? You might also try passing -s to ar (it's equivalent to calling ranlib, from what i understand). -- - stephan beal

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Sako Youssouf
la part de Black, Michael (IS) Envoyé : jeudi 12 avril 2012 17:17 À : General Discussion of SQLite Database Objet : Re: [sqlite] error compilation with Sqlite in C program You're missing a step in your library build. ranlib libsqlite.a Michael D. Black Senior Scientist Advanced Analytics D

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
On Thu, Apr 12, 2012 at 5:10 PM, Sako Youssouf < youssouf.s...@renault-trucks.com> wrote: > root@ubuntu:/home/y_sako/Documents/sqlite-amalgamation-3071100# gcc > -L/home/y_sako/Documents/sqlite-amalgamation-3071100/ -lsqlite -L/usr/lib/ > -ldl -lpthread -o compil compil.c > what happens if you

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Black, Michael (IS)
-users-boun...@sqlite.org] on behalf of Sako Youssouf [youssouf.s...@renault-trucks.com] Sent: Thursday, April 12, 2012 10:10 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite] error compilation with Sqlite in C program Yes that what I tried but as you can see below when I do

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Sako Youssouf
d'origine- De : sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] De la part de Stephan Beal Envoyé : jeudi 12 avril 2012 17:06 À : General Discussion of SQLite Database Objet : Re: [sqlite] error compilation with Sqlite in C program On Thu, Apr 12, 2012 at 5:00 PM, Sako

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
On Thu, Apr 12, 2012 at 5:00 PM, Sako Youssouf < youssouf.s...@renault-trucks.com> wrote: > compil.c:(.text+0x6f): multiple definition of `main' > Remove shell.o from your libsqlite.a. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Sako Youssouf
to changed? -Message d'origine- De : sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] De la part de Stephan Beal Envoyé : jeudi 12 avril 2012 16:18 À : General Discussion of SQLite Database Objet : Re: [sqlite] error compilation with Sqlite in C program On Thu, Apr 12

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
On Thu, Apr 12, 2012 at 4:14 PM, Sako Youssouf < youssouf.s...@renault-trucks.com> wrote: > root@ubuntu:/home/y_sako/Documents/sqlite-amalgamation-3071100# gcc > -lsqlite -o compil compil.c > Are you sure your -lsqlite isn't picking up an sqlite2 under /usr/lib? Could you try adding -L. to your

[sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Sako Youssouf
Hi, I'm a new user of sqlite, i want to test utilization of sqlite in a C program. So I generated a static lib of sqlite (using the amalgamation files) and I try to use it in my C program. But I get some error. Below my compilation code and the return error. The program that I wanted test is the