[sqlite] error 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 -l
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
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 f
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'
compil.
rs-boun...@sqlite.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.
17:33
À : 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 al
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
http://wandering
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
Michael D. Black
Senior Scientist
Advanced A
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
qlite-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
de d'état d'exécution
-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 17:06
À : General Discussion of SQLite Database
Objet : Re: [sqlite] error compilation with Sqlite i
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
_
é 1 code d'état d'exécution
do you see what I have 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 : R
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 c
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
15 matches
Mail list logo