Re: [sqlite] Shared binary plus static lib

2009-06-06 Thread Mark Constable
Would anyone have a clue as to how I could end up with /usr/lib/libsqlite3.so.0
as well as /usr/bin/sqlite3 and /usr/lib/libsqlite3.a ?

cc -DTHREADSAFE=0 -c sqlite3.c
cc -DHAVE_READLINE=1 -o sqlite3 sqlite3.o shell.c -ldl -lreadline -ltermcap 
-I/usr/include/readline
ar cru libsqlite3.a sqlite3.o

--markc
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Shared binary plus static lib

2009-06-06 Thread Mark Constable
On Sunday 07 June 2009 10:51:05 Jay A. Kreibich wrote:
> > > > Howdy, I'd like to end up with a shared NON-threaded NON-TCL binary
> > > > but also with a libsqlite3.a static lib. Could anyone suggest how I
> > > > could alter this Makefile to support these requirements please?
> >
> > Is there a previous step need for a CVS checkout?
> 
>   Yes, but since I don't work with CVS I'm not exactly sure what it is.
>   In the brief time between when the amalgamation was introduced and
>   when it became the official distribution, there was a "make
>   amalgamation" target.  The current process appears to require running
>   the tool/mksqlitec.tcl script.  Obviously, that requires TCL.

Yikes, that will hurt when I go to build on a TCL-less system.

>   You might start here:
>   http://www.sqlite.org/cvstrac/wiki?p=SqliteBuildProcess

Ah, thanks again for that. I would have found it eventually but your
link certainly made my life a whole bunch easier. For the list archive,
in case someone else Googles this issue, here is how I built from CVS...

  cd /usr/src
  cvs -d :pserver:anonym...@www.sqlite.org:/sqlite login
  cvs -d :pserver:anonym...@www.sqlite.org:/sqlite checkout sqlite
  cd sqlite
  make -f Makefile.linux-gcc target_source
  make -f Makefile.linux-gcc sqlite3.c
  mv sqlite3.c tsrc/
  cd tsrc/
  cc -DTHREADSAFE=0 -c sqlite3.c
  cc -DHAVE_READLINE=1 -o sqlite3 sqlite3.o shell.c -ldl -lreadline -ltermcap 
-I/usr/include/readline
  ar cru libsqlite3.a sqlite3.o
  install -Dm0755 sqlite3 $pkgdir/usr/bin/sqlite3
  install -Dm0644 libsqlite3.a $pkgdir/usr/lib/libsqlite3.a
  install -Dm0644 ../sqlite3.1 $pkgdir/usr/share/man/man1/sqlite3.1

Where $pkgdir is somewhere else to tar/zip up a binary package.

--markc
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Importing text file of numbers into INTEGER PRIMARY KEY aka rowid

2009-06-06 Thread P Kishor
On Sat, Jun 6, 2009 at 9:30 PM, John Machin wrote:
> Expected behaviour for various raw file contents:
>
> 1234 => one row, ok (with luck)
> 1234\n => one row, ok
> 1234\n\n => first row ok, 2nd is empty, expect error message
> 1234\n5678 => two rows, ok (with luck)
> 1234\n5678\n => two rows, ok


very correct interpretation, and much better than mine. Essentially,
\n\n causes .import to croak if the column being imported into is
INTEGER PRIMARY KEY. Makes sense, and yes, a better error message
would always be nice.


-- 
Puneet Kishor
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Importing text file of numbers into INTEGER PRIMARY KEY aka rowid

2009-06-06 Thread John Machin
On 7/06/2009 11:38 AM, P Kishor wrote:
> On Sat, Jun 6, 2009 at 8:28 PM, Kelly Jones 
> wrote:
>> On 6/6/09, P Kishor  wrote:
>>> On Sat, Jun 6, 2009 at 1:43 PM, Kelly Jones
>>> wrote:
 I have a text file onenum.txt with just "1234\n" in it, and a db w/
 this schema:

 sqlite> .schema
 CREATE TABLE test (foo INTEGER PRIMARY KEY);

 When I import, it fails as follows:

 sqlite> .import onenum.txt test
 Error: datatype mismatch

 Is sqlite3 treating "1234" as a string or something? Short of doing
 "INSERT INTO test VALUES (1234);", how do I import numbers into
 sqlite3's rowid column? [1]
>>> Remove the "\n"
>> Er, by "\n", I just meant that the file ended in a newline. I didn't
>> literally type a backslash and an 'n' into the file.
> 
> 
> Yes, I understand what you meant. If there is a newline, sqlite tries
> to import it, and that doesn't fit into the INTEGER PRIMARY KEY
> categorization, hence the datatype mismatch error.

If there is a newline?? There should be a newline at the end of each 
line of the file; with luck the reader will not complain if the final 
newline is missing.

Expected behaviour for various raw file contents:

1234 => one row, ok (with luck)
1234\n => one row, ok
1234\n\n => first row ok, 2nd is empty, expect error message
1234\n5678 => two rows, ok (with luck)
1234\n5678\n => two rows, ok

> So, the following
> fails (I am typing bogus lines to indicate the newline
> --
> 1234
> 
> --
> 
> while the following imports just fine
> --
> 1234
> --

Simply: avoid having empty or blank lines in the .import file, 
especially at the end, where they're not obvious.

IMHO that error message is carrying "Lite" a little too far; some prefix of:
 data mismatch in line 2, column 1 (foo): expected integer, found ''
might save some wear and tear on the help desk :-)

Cheers,
John


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Importing text file of numbers into INTEGER PRIMARY KEY aka rowid

2009-06-06 Thread Kelly Jones
On 6/6/09, P Kishor  wrote:
> On Sat, Jun 6, 2009 at 8:28 PM, Kelly Jones
> wrote:
>> On 6/6/09, P Kishor  wrote:
>>> On Sat, Jun 6, 2009 at 1:43 PM, Kelly Jones
>>> wrote:
 I have a text file onenum.txt with just "1234\n" in it, and a db w/
 this schema:

 sqlite> .schema
 CREATE TABLE test (foo INTEGER PRIMARY KEY);

 When I import, it fails as follows:

 sqlite> .import onenum.txt test
 Error: datatype mismatch

 Is sqlite3 treating "1234" as a string or something? Short of doing
 "INSERT INTO test VALUES (1234);", how do I import numbers into
 sqlite3's rowid column? [1]
>>>
>>> Remove the "\n"
>>
>> Er, by "\n", I just meant that the file ended in a newline. I didn't
>> literally type a backslash and an 'n' into the file.
>
>
> Yes, I understand what you meant. If there is a newline, sqlite tries
> to import it, and that doesn't fit into the INTEGER PRIMARY KEY
> categorization, hence the datatype mismatch error. So, the following
> fails (I am typing bogus lines to indicate the newline
> --
> 1234
>
> --
>
> while the following imports just fine
> --
> 1234
> --

Thanks! That did the trick. I had an extra newline in the file.

-- 
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Importing text file of numbers into INTEGER PRIMARY KEY aka rowid

2009-06-06 Thread John Machin
On 7/06/2009 11:28 AM, Kelly Jones wrote:
> On 6/6/09, P Kishor  wrote:
>> On Sat, Jun 6, 2009 at 1:43 PM, Kelly Jones
>> wrote:
>>> I have a text file onenum.txt with just "1234\n" in it, and a db w/
>>> this schema:
>>>
>>> sqlite> .schema
>>> CREATE TABLE test (foo INTEGER PRIMARY KEY);
>>>
>>> When I import, it fails as follows:
>>>
>>> sqlite> .import onenum.txt test
>>> Error: datatype mismatch
>>>
>>> Is sqlite3 treating "1234" as a string or something? Short of doing
>>> "INSERT INTO test VALUES (1234);", how do I import numbers into
>>> sqlite3's rowid column? [1]
>> Remove the "\n"
> 
> Er, by "\n", I just meant that the file ended in a newline. I didn't
> literally type a backslash and an 'n' into the file.
> 
> Note there's only line in the entire file, so there are no duplicates
> or misformatted entries.

I can't reproduce your problem. If you can reproduce it, show us a 
verbatim transcript of your session, preferably obtained by copy/paste 
and including an *unambiguous* dump of the file contents, together with 
platform details.

E.g.
[Windows XP SP2, SQLite version 3.6.14]

| C:\junk>copy con onenum.txt
| 1234
| ^Z
| 1 file(s) copied.
|
| C:\junk>type onenum.txt
| 1234
|
| C:\junk>python -c "print repr(open('onenum.txt', 'rb').read())"
| '1234\r\n'
|
| C:\junk>sqlite3 test.db
| SQLite version 3.6.14
| Enter ".help" for instructions
| Enter SQL statements terminated with a ";"
| sqlite> CREATE TABLE test (foo INTEGER PRIMARY KEY);
| sqlite> .schema
| CREATE TABLE test (foo INTEGER PRIMARY KEY);
| sqlite> .import onenum.txt test
| sqlite> select rowid, foo, typeof(foo) from test;
| 1234|1234|integer
| sqlite> ^Z
|
| C:\junk>

Did I hear a mutter about the '\r' above?

| C:\junk>python -c "open('onenum2.txt', 'wb').write('1234\n')"
|
| C:\junk>python -c "print repr(open('onenum2.txt', 'rb').read())"
| '1234\n'
|
| C:\junk>sqlite3 test2.db
| SQLite version 3.6.14
| Enter ".help" for instructions
| Enter SQL statements terminated with a ";"
| sqlite> CREATE TABLE test (foo INTEGER PRIMARY KEY);
| sqlite> .schema
| CREATE TABLE test (foo INTEGER PRIMARY KEY);
| sqlite> .import onenum2.txt test
| sqlite> select rowid, foo, typeof(foo) from test;
| 1234|1234|integer
| sqlite> ^Z
|
| C:\junk>

HTH,
John
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Importing text file of numbers into INTEGER PRIMARY KEY aka rowid

2009-06-06 Thread P Kishor
On Sat, Jun 6, 2009 at 8:28 PM, Kelly Jones wrote:
> On 6/6/09, P Kishor  wrote:
>> On Sat, Jun 6, 2009 at 1:43 PM, Kelly Jones
>> wrote:
>>> I have a text file onenum.txt with just "1234\n" in it, and a db w/
>>> this schema:
>>>
>>> sqlite> .schema
>>> CREATE TABLE test (foo INTEGER PRIMARY KEY);
>>>
>>> When I import, it fails as follows:
>>>
>>> sqlite> .import onenum.txt test
>>> Error: datatype mismatch
>>>
>>> Is sqlite3 treating "1234" as a string or something? Short of doing
>>> "INSERT INTO test VALUES (1234);", how do I import numbers into
>>> sqlite3's rowid column? [1]
>>
>> Remove the "\n"
>
> Er, by "\n", I just meant that the file ended in a newline. I didn't
> literally type a backslash and an 'n' into the file.


Yes, I understand what you meant. If there is a newline, sqlite tries
to import it, and that doesn't fit into the INTEGER PRIMARY KEY
categorization, hence the datatype mismatch error. So, the following
fails (I am typing bogus lines to indicate the newline
--
1234

--

while the following imports just fine
--
1234
--



>
> Note there's only line in the entire file, so there are no duplicates
> or misformatted entries.
>
> --
> We're just a Bunch Of Regular Guys, a collective group that's trying
> to understand and assimilate technology. We feel that resistance to
> new ideas and technology is unwise and ultimately futile.
>



-- 
Puneet Kishor http://www.punkish.org/
Carbon Model http://carbonmodel.org/
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org/
Science Commons Fellow, Geospatial Data http://sciencecommons.org
Nelson Institute, UW-Madison http://www.nelson.wisc.edu/
---
collaborate, communicate, compete
===
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Importing text file of numbers into INTEGER PRIMARY KEY aka rowid

2009-06-06 Thread Kelly Jones
On 6/6/09, P Kishor  wrote:
> On Sat, Jun 6, 2009 at 1:43 PM, Kelly Jones
> wrote:
>> I have a text file onenum.txt with just "1234\n" in it, and a db w/
>> this schema:
>>
>> sqlite> .schema
>> CREATE TABLE test (foo INTEGER PRIMARY KEY);
>>
>> When I import, it fails as follows:
>>
>> sqlite> .import onenum.txt test
>> Error: datatype mismatch
>>
>> Is sqlite3 treating "1234" as a string or something? Short of doing
>> "INSERT INTO test VALUES (1234);", how do I import numbers into
>> sqlite3's rowid column? [1]
>
> Remove the "\n"

Er, by "\n", I just meant that the file ended in a newline. I didn't
literally type a backslash and an 'n' into the file.

Note there's only line in the entire file, so there are no duplicates
or misformatted entries.

-- 
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Shared binary plus static lib

2009-06-06 Thread Jay A. Kreibich
On Sun, Jun 07, 2009 at 09:26:03AM +1000, Mark Constable scratched on the wall:
> On Sunday 07 June 2009 00:15:21 Jay A. Kreibich wrote:
> > > Howdy, I'd like to end up with a shared NON-threaded NON-TCL binary
> > > but also with a libsqlite3.a static lib. Could anyone suggest how I
> > > could alter this Makefile to support these requirements please?
> > 
> >   Assuming you're using the amalgamation, the Makefile is for use
> >   with "configure".  It isn't designed to be hand-edited.
> 
> Thank you for a clear and thorough response.
> 
> I should have mentioned I'm building (unofficial) Archlinux binary
> packages from CVS. This used to work (at least it did for the
> downloadable package)...

  I'm not all that familiar with the CVS builds.

> It stopped working so I RTFM and noted that configure from CVS is
> not guaranteed to always work so I was going to provide my own
> modified copy of Makefile.linux-gcc.

  Yeah, for good or for bad, the amalgamation is "the" build method.

> >   $ cc -DTHREADSAFE=0 -c sqlite3.c  # build sqlite3.o
> >   $ cc -o sqlite3 sqlite3.o shell.c # build sqlite3 binary
> >   $ ar cru libsqlite3.a sqlite3.o   # build libsqlite3.a
> 
> Is there a previous step need for a CVS checkout?

  Yes, but since I don't work with CVS I'm not exactly sure what it is.
  In the brief time between when the amalgamation was introduced and
  when it became the official distribution, there was a "make
  amalgamation" target.  The current process appears to require running
  the tool/mksqlitec.tcl script.  Obviously, that requires TCL.

  You might start here:

  http://www.sqlite.org/cvstrac/wiki?p=SqliteBuildProcess

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Our opponent is an alien starship packed with atomic bombs.  We have
 a protractor."   "I'll go home and see if I can scrounge up a ruler
 and a piece of string."  --from Anathem by Neal Stephenson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Shared binary plus static lib

2009-06-06 Thread Mark Constable
On Sunday 07 June 2009 00:15:21 Jay A. Kreibich wrote:
> > Howdy, I'd like to end up with a shared NON-threaded NON-TCL binary
> > but also with a libsqlite3.a static lib. Could anyone suggest how I
> > could alter this Makefile to support these requirements please?
> 
>   Assuming you're using the amalgamation, the Makefile is for use
>   with "configure".  It isn't designed to be hand-edited.

Thank you for a clear and thorough response.

I should have mentioned I'm building (unofficial) Archlinux binary
packages from CVS. This used to work (at least it did for the
downloadable package)...

  cd $srcdir/$pkgname
  export LTLINK_EXTRAS="-ldl"
  export CFLAGS="$CFLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1"
  ./configure \
--prefix=/usr \
--disable-tcl \
--disable-threadsafe \
--enable-static \
--enable-load-extension || return 1
  make || return 1
  make DESTDIR=$pkgdir install || return 1

It stopped working so I RTFM and noted that configure from CVS is
not guaranteed to always work so I was going to provide my own
modified copy of Makefile.linux-gcc.

>   If you want to compile things by hand, just pass the -DTHREADSAFE=0
>   on the command line when you compile sqlite3.c.
> 
>   $ cc -DTHREADSAFE=0 -c sqlite3.c# build sqlite3.o
>   $ cc -o sqlite3 sqlite3.o shell.c   # build sqlite3 binary
>   $ ar cru libsqlite3.a sqlite3.o # build libsqlite3.a

Is there a previous step need for a CVS checkout?

I don't have a sqlite3.c in the src/ dir (I presume).

--markc
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Getting last inserted rowid?

2009-06-06 Thread John Elrick
SNIP
>> processed by a complied virtual machine.  Threads switch at the
>> machine code level, so a thread could switch between the processing
>> of the 'g' and the 'i' of the first 'begin'.
>> 
>
> SQLite actually maintains a mutex per connection. Every API call 
> acquires this mutext and keeps it for the duration of the call. Thus no 
> two calls can proceed simultaneously on the same connection.
>
> So no, another thread cannot interfere while sqlite3_prepare call 
> advances from 'g' to 'i'.
>   

I stand corrected.


John
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Importing text file of numbers into INTEGER PRIMARY KEY aka rowid

2009-06-06 Thread John Stanton
It looks as if one of your test fields is not formatted as a valid 
nteger or is pperhaps a duplicate.

Try initially loading your data into a table with a column specified as 
a real number and not defined as the primary key.  If it succeeds use 
the table to search for duplicates and non-integer numbers.


Kelly Jones wrote:
> I have a text file onenum.txt with just "1234\n" in it, and a db w/
> this schema:
>
> sqlite> .schema
> CREATE TABLE test (foo INTEGER PRIMARY KEY);
>
> When I import, it fails as follows:
>
> sqlite> .import onenum.txt test
> Error: datatype mismatch
>
> Is sqlite3 treating "1234" as a string or something? Short of doing
> "INSERT INTO test VALUES (1234);", how do I import numbers into
> sqlite3's rowid column? [1]
>
> [1] Since foo is INTEGER PRIMARY KEY, it's just an alias for rowid.
>
>   

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite 80x15 badge.

2009-06-06 Thread Alberto Simões
Hello

If anyone find it interesting, please use.
   http://dicionario-aberto.net/sqlite-db.png
Also, be free to put it on sqlite.org or something.

Cheers
Alberto
-- 
Alberto Simões
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Concat two fields for LIKE query?

2009-06-06 Thread Andrés G. Aragoneses
P Kishor wrote:
> 2009/6/4 "Andrés G. Aragoneses" :
>> Igor Tandetnik wrote:
>>> "Andrés G. Aragoneses" 
>>> wrote:
 My query, which I want to make it return the first row:

 SELECT * FROM SomeTable WHERE Path+FileName LIKE '%user/File%'
>>> SELECT * FROM SomeTable WHERE Path || FileName LIKE '%user/File%';
>>>
>>> In SQL, string concatenation operator is ||, not +.
>>>
>> Cool! And can I do this as well?:
>>
>> SELECT Path||Filename FROM SomeTable WHERE Path || FileName LIKE
>> '%user/File%'
>>
> 
> Sure, but wouldn't it be easier and quicker for you to just try it
> yourself than ask? Don't be afraid. Try it out. SELECTs can't harm
> your database.

Thanks, I had to run and didn't have time to test it at that moment :P

Andres

-- 

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Importing text file of numbers into INTEGER PRIMARY KEY aka rowid

2009-06-06 Thread P Kishor
On Sat, Jun 6, 2009 at 1:43 PM, Kelly Jones wrote:
> I have a text file onenum.txt with just "1234\n" in it, and a db w/
> this schema:
>
> sqlite> .schema
> CREATE TABLE test (foo INTEGER PRIMARY KEY);
>
> When I import, it fails as follows:
>
> sqlite> .import onenum.txt test
> Error: datatype mismatch
>
> Is sqlite3 treating "1234" as a string or something? Short of doing
> "INSERT INTO test VALUES (1234);", how do I import numbers into
> sqlite3's rowid column? [1]

Remove the "\n"


>
> [1] Since foo is INTEGER PRIMARY KEY, it's just an alias for rowid.
>
> --
> We're just a Bunch Of Regular Guys, a collective group that's trying
> to understand and assimilate technology. We feel that resistance to
> new ideas and technology is unwise and ultimately futile.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Importing text file of numbers into INTEGER PRIMARY KEY aka rowid

2009-06-06 Thread Kelly Jones
I have a text file onenum.txt with just "1234\n" in it, and a db w/
this schema:

sqlite> .schema
CREATE TABLE test (foo INTEGER PRIMARY KEY);

When I import, it fails as follows:

sqlite> .import onenum.txt test
Error: datatype mismatch

Is sqlite3 treating "1234" as a string or something? Short of doing
"INSERT INTO test VALUES (1234);", how do I import numbers into
sqlite3's rowid column? [1]

[1] Since foo is INTEGER PRIMARY KEY, it's just an alias for rowid.

-- 
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Shared binary plus static lib

2009-06-06 Thread Jay A. Kreibich
On Sat, Jun 06, 2009 at 04:31:30PM +1000, Mark Constable scratched on the wall:
> Howdy, I'd like to end up with a shared NON-threaded NON-TCL binary
> but also with a libsqlite3.a static lib. Could anyone suggest how I
> could alter this Makefile to support these requirements please?

  Assuming you're using the amalgamation, the Makefile is for use
  with "configure".  It isn't designed to be hand-edited.


  This is likely the easiest way

  Download:   http://sqlite.org/sqlite-amalgamation-3.6.14.2.tar.gz

  You want the amalgamation tar file.  This does not have TCL support.
  Only the "...-tea.tar.gz" file has TCL support.

  Unpack.

  Inside, run:

  $ ./configure --prefix=/usr/local --disable-threadsafe
  $ make

  That will build both the dynamic and static lib (in .libs), as well as 
  the shell.  You can either pick your own install prefix above of copy
  the libs to wherever you need (just be aware of link path issues with
  the dynamic lib).




  If you want to compile things by hand, just pass the -DTHREADSAFE=0
  on the command line when you compile sqlite3.c.

  $ cc -DTHREADSAFE=0 -c sqlite3.c  # build sqlite3.o
  $ cc -o sqlite3 sqlite3.o shell.c # build sqlite3 binary
  $ ar cru libsqlite3.a sqlite3.o   # build libsqlite3.a

  Check the syntax on that last line.  It may be different for you.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Our opponent is an alien starship packed with atomic bombs.  We have
 a protractor."   "I'll go home and see if I can scrounge up a ruler
 and a piece of string."  --from Anathem by Neal Stephenson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Problem with SQLite3

2009-06-06 Thread Paul Blay
2009/6/5 Ann Shipley :
> I am trying to install Google Adwords Editor and when it attempts to open I
> receive a message "AdWords Editor has stopped working.  A problem has caused
> it to stop working correctly.  Windows will notify if there is a solution."
> Then a window opens stating "Solve a problem with SQLite3" and when I click
> and try to download, three files appear in the zip file however I can not
> open.
>
> Need assistance to correct this problem.  My system is running Vista Home
> Premium svc pk 1, 64bit

This sounds like it may be a problem best answered in the Google
Adwords forum to me. http://www.webmasterworld.com/google_adwords/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Problem with SQLite3

2009-06-06 Thread Ann Shipley
I am trying to install Google Adwords Editor and when it attempts to open I
receive a message "AdWords Editor has stopped working.  A problem has caused
it to stop working correctly.  Windows will notify if there is a solution."
Then a window opens stating "Solve a problem with SQLite3" and when I click
and try to download, three files appear in the zip file however I can not
open.

Need assistance to correct this problem.  My system is running Vista Home
Premium svc pk 1, 64bit

-- 
Ann M Shipley
M3 Certified MasterConsultant
Private Wealth Group
Dreams2Wealth Enterprises, LLC
a...@dreams2wealth.net
www.annshipley.com
www.dreams2wealth.us
440-226-1241

If you choose to work hard all your life, that is your business, if you
choose to work smart, earn more money and become wealthy, that is my
business.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Shared binary plus static lib

2009-06-06 Thread Mark Constable
Howdy, I'd like to end up with a shared NON-threaded NON-TCL binary
but also with a libsqlite3.a static lib. Could anyone suggest how I
could alter this Makefile to support these requirements please?

For x86_64 and i686, kernel 2.6.29.4, glibc 2.10.1.

TOP = ../sqlite3
BCC = gcc -O2
USLEEP = -DHAVE_USLEEP=1
THREADSAFE = -DTHREADSAFE=0
THREADLIB = -lpthread -ldl
TLIBS =
OPTS = -DNDEBUG=1
OPTS += -DHAVE_FDATASYNC=1
EXE =
TCC = gcc -O2
AR = ar cr
RANLIB = ranlib
MKSHLIB = gcc -shared
SO = so
SHPREFIX = lib
READLINE_FLAGS =
LIBREADLINE = -lreadline -ltermcap
NAWK = awk
include $(TOP)/main.mk

--markc
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users