Re: [sqlite] SQLite under linux

2006-09-27 Thread Lloyd
Thanks everybody, I have downloaded the library RPM from
http://rpm.pbone.net/

and the library name is 

libsqlite-3.2.1-1.i386.rpm

It may be useful for newbie like me...

and did as what you said. And works fine...

Thanks, 
 Lloyd.


On Wed, 2006-09-27 at 10:08 +0200, Markus Hoenicka wrote:
> Lloyd <[EMAIL PROTECTED]> was heard to say:
> 
> > Unfortunately, I don't know how to install this library in my system.
> > Please help me.. If I am dealing with the wrong file, please let me know
> > from where I can get the needed installable library.
> >
> 
> Maybe you should tell us which system you run. Most Linux distributions offer
> SQLite as an easy-to-install package. E.g. on Debian you'd do something like:
> 
> apt-get install libsqlite3-dev libsqlite3-0 sqlite3
> 
> Once that is installed, you'll just have to insert the sqlite header file into
> your sources and add -lsqlite3 to your gcc command line in order to build an
> app that uses SQLite.
> 
> regards,
> Markus
> 


__
Scanned and protected by Email scanner

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



Re: [sqlite] SQLite under linux

2006-09-27 Thread Markus Hoenicka
Martin Jenkins <[EMAIL PROTECTED]> was heard to say:

> 3. make distclean doesn't remove the installed files from usr/local
>

I believe it is not supposed to. "make distclean" should remove any files from
your build directory that either "configure" or "make" created. This usually
returns your build directory to the state right after unpacking the sources
from the tarball. "make uninstall" should remove installed files though.

regards,
Markus


-- 
Markus Hoenicka
[EMAIL PROTECTED]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de


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



Re: [sqlite] SQLite under linux

2006-09-27 Thread Markus Hoenicka
Lloyd <[EMAIL PROTECTED]> was heard to say:

> Unfortunately, I don't know how to install this library in my system.
> Please help me.. If I am dealing with the wrong file, please let me know
> from where I can get the needed installable library.
>

Maybe you should tell us which system you run. Most Linux distributions offer
SQLite as an easy-to-install package. E.g. on Debian you'd do something like:

apt-get install libsqlite3-dev libsqlite3-0 sqlite3

Once that is installed, you'll just have to insert the sqlite header file into
your sources and add -lsqlite3 to your gcc command line in order to build an
app that uses SQLite.

regards,
Markus

-- 
Markus Hoenicka
[EMAIL PROTECTED]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de


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



Re: [sqlite] SQLite under linux

2006-09-26 Thread Lloyd
On Tue, 2006-09-26 at 19:18 +0100, Martin Jenkins wrote:
> If all you want to do is build an application using (some version of) 
> sqlite then just download the library and link against it - you don't 
> have to download the SQLite source and build it.
> 

Thanks Martin, I too wanted the same only. But I don't know how to
download and install the library on my Linux. I went to the download
section of the SQLite site and found  a file called sqlite-3.3.7.so.gz.
I think this is the library which I want.

Unfortunately, I don't know how to install this library in my system.
Please help me.. If I am dealing with the wrong file, please let me know
from where I can get the needed installable library.

Thanks for your clear and patient reply.

Thanks,
  Lloyd. 




__
Scanned and protected by Email scanner

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



Re: [sqlite] SQLite under linux

2006-09-26 Thread Martin Jenkins

Martin Jenkins wrote:

noticed a couple of minor nits

1. configure wants g++ but ISTM the build doesn't actually use it
2. "make clean" (or was it distclean?) doesn't delete sqlite3.pc


There was supposed to be a 3.

3. make distclean doesn't remove the installed files from usr/local

I'll have a look at fixing the autoconf stuff and maybe raise a bug 
report tomorrow but right now I'm going for a beer ;)


Martin

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



Re: [sqlite] SQLite under linux

2006-09-26 Thread Martin Jenkins

Clay Dowling wrote:
> > ./configure, especially since I build on more platforms than are 
supported

> > by default.  OpenBSD and FreeBSD are in my mix.

Like you I always ./confgure and haven't had any problems. I just built
the libs on Cygwin and noticed a couple of minor nits but nothing worth 
mentioning. Certainly major like Lloyd is seeing.


1. configure wants g++ but ISTM the build doesn't actually use it
2. "make clean" (or was it distclean?) doesn't delete sqlite3.pc

I'm curious to know how/why he's getting these tcl errors though.

Martin





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



Re: [sqlite] SQLite under linux

2006-09-26 Thread Clay Dowling
./configure, especially since I build on more platforms than are supported
by default.  OpenBSD and FreeBSD are in my mix.

Clay


Martin Jenkins said:
> Clay Dowling wrote:
>> I don't have tcl installed on my systems and I've never had a problem
>> doing the default build.  I do skip "make test" because I don't have tcl
>> installed, and because I don't modify my copies of SQLite.
>
> Do you use Makefile.linux or go the ./configure route?
>
> Martin
>
> -
> To unsubscribe, send email to [EMAIL PROTECTED]
> -
>
>


-- 
Simple Content Management
http://www.ceamus.com


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



Re: [sqlite] SQLite under linux

2006-09-26 Thread Martin Jenkins

Clay Dowling wrote:

I don't have tcl installed on my systems and I've never had a problem
doing the default build.  I do skip "make test" because I don't have tcl
installed, and because I don't modify my copies of SQLite.


Do you use Makefile.linux or go the ./configure route?

Martin

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



Re: [sqlite] SQLite under linux

2006-09-26 Thread Clay Dowling
I don't have tcl installed on my systems and I've never had a problem
doing the default build.  I do skip "make test" because I don't have tcl
installed, and because I don't modify my copies of SQLite.

Clay

Martin Jenkins said:
> Clay Dowling wrote:
>> What I strongly recommend doing, rather than trying to cobble together
>> your own solution, is to download the source and go through the build
>> and
>> install -exactly- as decribed in the document.
>
> Good point, but I don't think he has (or wants) Tcl, so the build isn't
> going to work. Also, there seems to be a make install missing from those
> instructions so I'm not convinced it would work even if he did have Tcl.
>
> Martin
>
> -
> To unsubscribe, send email to [EMAIL PROTECTED]
> -
>
>


-- 
Simple Content Management
http://www.ceamus.com


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



Re: [sqlite] SQLite under linux

2006-09-26 Thread Martin Jenkins

Clay Dowling wrote:

What I strongly recommend doing, rather than trying to cobble together
your own solution, is to download the source and go through the build and
install -exactly- as decribed in the document.


Good point, but I don't think he has (or wants) Tcl, so the build isn't 
going to work. Also, there seems to be a make install missing from those 
instructions so I'm not convinced it would work even if he did have Tcl.


Martin

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



Re: [sqlite] SQLite under linux

2006-09-26 Thread Martin Jenkins

Lloyd wrote:

After performing this section I got lots of errors. (I shall Add it
at the end of mail)


Either you're going to have to fix these errors BEFORE you proceed OR 
download the pre-built library from the site.



But when I browsed through the output directory, I found the
sqlite3.h file


sqlite3.h is built early on and is no indication that the library build 
was successful. Although you can copy it into your source directory, you 
shouldn't have to, it is supposed to be installed in a "standard place" 
with "make install" so that the compiler can find it automatically.



copied that file too to mu desktop directory
then given the command
gcc sqlite.c -o sqlite

it shown the following erorrs.

[EMAIL PROTECTED] gcc sqlite.c  -o sqlite /tmp/ccE2LJqr.o(.text+0xe1):
In function `main': : undefined reference to `sqlite3_open' 
/tmp/ccE2LJqr.o(.text+0xfb): In function `main': : undefined
reference to `sqlite3_errmsg' /tmp/ccE2LJqr.o(.text+0x11d): 


Your program includes calls to functions in the SQLite library, but you 
didn't successfully build that library so the references to the SQLite 
functions in your code cannot be resolved (i.e. linked to the code in 
the library).



So I tried this way...
gcc -c sqlite.c -c
thus got the sqlite.o file


All this command does is build a single object file. It doesn't produce 
an executable or link your program with the SQLite library.



then I executed the ldconfig command this way
ldconfig /root/Desktop/


ldconfig is nothing to do with this - it updates the system when new 
shared libraries are installed, but you haven't built or installed any.



ld /root/Desktop/sqlite-3.3.7.so  /root/Desktop/sqlite.o
This too shown eorros..


Dunno what you thought this would do, but it isn't what you wanted it to 
do. ;)



[EMAIL PROTECTED] ld /root/Desktop/sqlite-3.3.7.so
/root/Desktop/sqlite.o ld: warning: cannot find entry symbol _start;
defaulting to 080483d8


This is what I meant in my comment to your use of the -c flag. Imagine 
that the linker puts a framework (with _start) around your code. You've 
omitted that step completely.


Here I am adding the error output of the make command... (I am not 
installed TCL on my macine.. and it is not needed)
.../src/tclsqlite.c:20:17: tcl.h: No such file or directory 
.../src/tclsqlite.c:54: error: syntax error before "Tcl_Interp" 
.../src/tclsqlite.c:54: warning: no semicolon at end of struct or


After you've run configure, open the Makefile in an editor and change 
the line that starts HAVE_TCL to "HAVE_TCL =". That will tell make not 
to build the Tcl extensions for SQLite. *NB* I think the proper way 
round this should be to run configure with the without-tcl option, that 
is type "../configure --without-tcl" in step 3.3 but when I tried this 
configure failed with an error. I'm pretty sure I've seen a note saying 
that configure is unsupported so maybe the failure isn't too surprising.


> Can I use the library alone without recompiling the whole sqlite?
> (Thus it will be easier for me to distribute my application along
> with sqlite)

If all you want to do is build an application using (some version of) 
sqlite then just download the library and link against it - you don't 
have to download the SQLite source and build it.


Assuming a very simple program saved in a file called ts.c:

-- cut --
#include 
#include 

int main(void)
{
printf("SQLIte version: %s\n", sqlite3_libversion());
return 0;
}
-- cut --

The command line to compile ts.c and link with the SQLite library is simply:

gcc -o ts tc.c -lsqlite3

This produces an executable called "ts" in the current directory. When I 
run this program (with "./ts") I see:


SQLIte version: 3.3.7

Martin

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



Re: [sqlite] SQLite under linux

2006-09-26 Thread Rich Shepard

On Tue, 26 Sep 2006, Lloyd wrote:


 This too doesn't work. First of all I did not install the library,
instead I copied the sqlite-3.3.7.so file to the lib folder. Then ran the
ldconfig command. Then I compiled gcc sqlite.c -o sqlite - l
/usr/lib/sqlite-3.3.7


  I suspect that you are making your own problems. Building executables --
and libraries -- in linux is a five-step process after downloading the
tarball:

  1.) tar xzvf .tar.gz (or .tgz).
  2.) cd to the created directory.
  3.) ./configure (N.B., you can use './configure --help | less' to view
options).
  4.) make
  5.) make install (as root).

Rich

--
Richard B. Shepard, Ph.D.   |The Environmental Permitting
Applied Ecosystem Services, Inc.(TM)|Accelerator
 Voice: 503-667-4517  Fax: 503-667-8863

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



Re: [sqlite] SQLite under linux

2006-09-26 Thread Lloyd
Hi,
  This too doesn't work. First of all I did not install the library,
instead I copied the sqlite-3.3.7.so file to the lib folder. Then ran
the ldconfig command. Then I compiled gcc sqlite.c -o sqlite -
l /usr/lib/sqlite-3.3.7

It is giving the error ld connot find the file
called /usr/lib/sqlite-3.3.7

How can I solve this? From where do I can get an installable copy if the
SQLite library for linux?

Thanks,
 Lloyd.

On Tue, 2006-09-26 at 13:17 +0100, Lloyd Thomas wrote:
> Hi Lloyd,
> I had exactly the same problem being new to C++. These are the 
> steps I took. You may find that the library files may be in a folder where 
> RH does not expect them to be. Try 'whereis libsqlite3.so' to locate. I 
> can't remember where the default lib folder is. you will need to 
> add -lsqlite3 in your Makefile or compile your code with -lsqlite3. You 
> don't mention what errors you get when the make files. Some may be able to 
> help you further if they have that information.
> 
> Lloyd T
> 
> - Original Message - 
> From: "Lloyd" <[EMAIL PROTECTED]>
> To: <sqlite-users@sqlite.org>
> Sent: Tuesday, September 26, 2006 12:45 PM
> Subject: [sqlite] SQLite under linux
> 
> 
> > Hi all,
> >  I have been trying to use SQLite with Redhat EL 4. I dont know how to
> > link the object file. I have downloaded the sqlite-3.3.7.so. but I don't
> > know how to link my source file with this file.
> >
> > As mentioned in the quick start guide I have copied the example source
> > code for C.
> >
> > though I could not find the sqlite3.h file, I downloaded the source code
> > file of the sqlite and executed the ../configure command. it worked file
> >
> > then I tried to "make"  the file, but it failed,  any how I got the
> > necessary sqlite3.h file.
> >
> > But still I don't know from where to download the sqlite library and how
> > to install it in my machine. Awaiting for your kind reply.
> >
> > Thanks and regards,
> >  Lloyd.
> >
> >
> > __
> > Scanned and protected by Email scanner
> >
> > -
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > -
> > 
> 
> 
> -
> To unsubscribe, send email to [EMAIL PROTECTED]
> -


__
Scanned and protected by Email scanner

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



Re: [sqlite] SQLite under linux

2006-09-26 Thread Mark Richards
To use the library, either in shared or static mode, you must first 
build it successfully and then install it,


Please tell us your build procedure and any errors you got.

/m

Lloyd wrote:


then I tried to "make"  the file, but it failed,  any how I got the
necessary sqlite3.h file.

But still I don't know from where to download the sqlite library and how
to install it in my machine. Awaiting for your kind reply.




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



[sqlite] SQLite under linux

2006-09-26 Thread Lloyd
1) I have downloaded the SQLite sqlite-3.3.7.so.gz and saved in the
desktop directory.

2) Then copied the sample C program from the quick start guide and saved
in a file. (given the name sqlite.c)
3) To get the sqlite3.h file, I downloaded the sqlite source.

 3.1) mkdir sqlite
 3.2) cd sqlite
 3.3) ../configure
 3.4) make
 
 After performing this section I got lots of errors. (I shall Add it at
the end of mail)

But when I browsed through the output directory, I found the sqlite3.h
file

copied that file too to mu desktop directory

then given the command


gcc sqlite.c -o sqlite 

it shown the following erorrs.

[EMAIL PROTECTED] gcc sqlite.c  -o sqlite
/tmp/ccE2LJqr.o(.text+0xe1): In function `main':
: undefined reference to `sqlite3_open'
/tmp/ccE2LJqr.o(.text+0xfb): In function `main':
: undefined reference to `sqlite3_errmsg'
/tmp/ccE2LJqr.o(.text+0x11d): In function `main':
: undefined reference to `sqlite3_close'
/tmp/ccE2LJqr.o(.text+0x148): In function `main':
: undefined reference to `sqlite3_exec'
/tmp/ccE2LJqr.o(.text+0x178): In function `main':
: undefined reference to `sqlite3_free'
/tmp/ccE2LJqr.o(.text+0x186): In function `main':
: undefined reference to `sqlite3_close'
collect2: ld returned 1 exit status


So I tried this way...


 gcc -c sqlite.c -c 



thus got the sqlite.o file

then I executed the ldconfig command this way

ldconfig /root/Desktop/

then tried 


ld /root/Desktop/sqlite-3.3.7.so  /root/Desktop/sqlite.o

This too shown eorros..

[EMAIL PROTECTED] ld /root/Desktop/sqlite-3.3.7.so /root/Desktop/sqlite.o
ld: warning: cannot find entry symbol _start; defaulting to 080483d8



(And it seems from your reply this way wont work)



Here I am adding the error output of the make command... (I am not
installed TCL on my macine.. and it is not needed)



.../src/tclsqlite.c:20:17: tcl.h: No such file or directory
.../src/tclsqlite.c:54: error: syntax error before "Tcl_Interp"
.../src/tclsqlite.c:54: warning: no semicolon at end of struct or union
.../src/tclsqlite.c:55: warning: data definition has no type or storage
class
.../src/tclsqlite.c:59: error: syntax error before '}' token
.../src/tclsqlite.c:67: error: syntax error before "Tcl_Interp"
.../src/tclsqlite.c:67: warning: no semicolon at end of struct or union
.../src/tclsqlite.c:69: error: conflicting types for 'pNext'
.../src/tclsqlite.c:58: error: previous declaration of 'pNext' was here
.../src/tclsqlite.c:70: error: syntax error before '}' token
.../src/tclsqlite.c:92: error: syntax error before "Tcl_Interp"
.../src/tclsqlite.c:92: warning: no semicolon at end of struct or union
.../src/tclsqlite.c:101: error: syntax error before '*' token
.../src/tclsqlite.c:101: warning: data definition has no type or storage
class
.../src/tclsqlite.c:102: error: syntax error before '*' token
.../src/tclsqlite.c:102: warning: data definition has no type or storage
class
.../src/tclsqlite.c:105: error: syntax error before '*' token
.../src/tclsqlite.c:105: warning: data definition has no type or storage
class
.../src/tclsqlite.c:110: error: syntax error before '}' token
.../src/tclsqlite.c:124: error: syntax error before '*' token
.../src/tclsqlite.c: In function `safeToUseEvalObjv':
.../src/tclsqlite.c:131: error: `pCmd' undeclared (first use in this
function)
.../src/tclsqlite.c:131: error: (Each undeclared identifier is reported
only once
.../src/tclsqlite.c:131: error: for each function it appears in.)
.../src/tclsqlite.c:131: warning: assignment makes pointer from integer
without a cast
.../src/tclsqlite.c: In function `findSqlFunc':
.../src/tclsqlite.c:147: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:148: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:148: error: invalid use of undefined type `struct
SqlFunc'
.../src/tclsqlite.c:148: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:149: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:150: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:151: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:151: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:152: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:152: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:152: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:152: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:152: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:152: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:152: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:152: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:152: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:152: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:152: error: dereferencing pointer to incomplete type
.../src/tclsqlite.c:152: 

Re: [sqlite] SQLite under linux

2006-09-26 Thread Lloyd Thomas

Hi Lloyd,
   I had exactly the same problem being new to C++. These are the 
steps I took. You may find that the library files may be in a folder where 
RH does not expect them to be. Try 'whereis libsqlite3.so' to locate. I 
can't remember where the default lib folder is. you will need to 
add -lsqlite3 in your Makefile or compile your code with -lsqlite3. You 
don't mention what errors you get when the make files. Some may be able to 
help you further if they have that information.


Lloyd T

- Original Message - 
From: "Lloyd" <[EMAIL PROTECTED]>

To: <sqlite-users@sqlite.org>
Sent: Tuesday, September 26, 2006 12:45 PM
Subject: [sqlite] SQLite under linux



Hi all,
 I have been trying to use SQLite with Redhat EL 4. I dont know how to
link the object file. I have downloaded the sqlite-3.3.7.so. but I don't
know how to link my source file with this file.

As mentioned in the quick start guide I have copied the example source
code for C.

though I could not find the sqlite3.h file, I downloaded the source code
file of the sqlite and executed the ../configure command. it worked file

then I tried to "make"  the file, but it failed,  any how I got the
necessary sqlite3.h file.

But still I don't know from where to download the sqlite library and how
to install it in my machine. Awaiting for your kind reply.

Thanks and regards,
 Lloyd.


__
Scanned and protected by Email scanner

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




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



[sqlite] SQLite under linux

2006-09-26 Thread Lloyd
Hi all,
  I have been trying to use SQLite with Redhat EL 4. I dont know how to
link the object file. I have downloaded the sqlite-3.3.7.so. but I don't
know how to link my source file with this file. 

As mentioned in the quick start guide I have copied the example source
code for C.

though I could not find the sqlite3.h file, I downloaded the source code
file of the sqlite and executed the ../configure command. it worked file

then I tried to "make"  the file, but it failed,  any how I got the
necessary sqlite3.h file.

But still I don't know from where to download the sqlite library and how
to install it in my machine. Awaiting for your kind reply.

Thanks and regards,
  Lloyd.


__
Scanned and protected by Email scanner

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