Re: [sqlite] Compiling on AIX OS

2020-02-26 Thread Domingo Alvarez Duarte

Hello and thank you for reply !

As I said it's an exercise to know the peculiarities of compiling on 
this platform and I'm exposing this experience here in hope it can help 
others and improve sqlite build system.


If what you mention is correct about requiring tcl 8.5 or newer then the 
configure procedure probably should check this and report the problem.


Cheers !

On 26/2/20 10:27, Shawn Wagner wrote:

I'm pretty sure the full build scripts require tcl 8.5 or newer. Maybe try
the -amalgamation or -autoconf versions?

On Wed, Feb 26, 2020 at 1:21 AM Domingo Alvarez Duarte 
wrote:


Hello !



$ uname -a
AIX minimal 1 7 00C63E504B00
$ tclsh
% puts $tcl_patchLevel
8.4.7
%


On 26/2/20 10:19, Shawn Wagner wrote:

puts $tcl_patchLevel

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


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

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


Re: [sqlite] Compiling on AIX OS

2020-02-26 Thread Shawn Wagner
I'm pretty sure the full build scripts require tcl 8.5 or newer. Maybe try
the -amalgamation or -autoconf versions?

On Wed, Feb 26, 2020 at 1:21 AM Domingo Alvarez Duarte 
wrote:

> Hello !
>
> 
>
> $ uname -a
> AIX minimal 1 7 00C63E504B00
> $ tclsh
> % puts $tcl_patchLevel
> 8.4.7
> %
> 
>
> On 26/2/20 10:19, Shawn Wagner wrote:
> > puts $tcl_patchLevel
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling on AIX OS

2020-02-26 Thread Domingo Alvarez Duarte

Hello !



$ uname -a
AIX minimal 1 7 00C63E504B00
$ tclsh
% puts $tcl_patchLevel
8.4.7
%


On 26/2/20 10:19, Shawn Wagner wrote:

puts $tcl_patchLevel

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


Re: [sqlite] Compiling on AIX OS

2020-02-26 Thread Shawn Wagner
What version of tcl do you have installed?

(At the tclsh prompt, do a `puts $tcl_patchLevel`)

On Wed, Feb 26, 2020 at 1:05 AM Domingo Alvarez Duarte 
wrote:

> Hello !
>
> Trying to compile https://sqlite.org/2020/sqlite-src-3310100.zip on AIX
> 7.1 operating system for exercise and to know the peculiarities of
> building software on this OS and I'm getting this error, somehow tclsh
> that is installed on this OS do not wrap/hide OS incompatibilities.
>
> 
>
> tclsh /home/mingo/dev/sqlite-src-3310100/tool/mkshellc.tcl >shell.c
> illegal access mode "rb"
>  while executing
> "open $topdir/src/shell.c.in rb"
>  invoked from within
> "set in [open $topdir/src/shell.c.in rb]"
>  (file "/home/mingo/dev/sqlite-src-3310100/tool/mkshellc.tcl" line 32)
> gmake: *** [Makefile:1079: shell.c] Error 1
>
> 
>
> Cheers !
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling on AIX OS

2020-02-26 Thread Domingo Alvarez Duarte
Going forward after fixing the access mode from "rb" to "r" we get this 
error (tclsh8.4):




tclsh /home/mingo/dev/sqlite-src-3310100/tool/mkshellc.tcl >shell.c
cp /home/mingo/dev/sqlite-src-3310100/ext/fts5/fts5parse.y .
rm -f fts5parse.h
./lemon  -S fts5parse.y
tclsh /home/mingo/dev/sqlite-src-3310100/ext/fts5/tool/mkfts5c.tcl
bad index "19-1": must be integer or end?-integer?
    while executing
"string range $date 0 [string last . $date]-1"
    (procedure "fts5_source_id" line 7)
    invoked from within
"fts5_source_id $::srcdir"
    (procedure "fts5c_printfile" line 7)
    invoked from within
"fts5c_printfile $f "
    ("foreach" body line 1)
    invoked from within
"foreach f $G(src) { fts5c_printfile $f }"
    (file 
"/home/mingo/dev/sqlite-src-3310100/ext/fts5/tool/mkfts5c.tcl" line 112)

gmake: *** [Makefile:1188: fts5.c] Error 1


On 26/2/20 10:05, Domingo Alvarez Duarte wrote:

Hello !

Trying to compile https://sqlite.org/2020/sqlite-src-3310100.zip on 
AIX 7.1 operating system for exercise and to know the peculiarities of 
building software on this OS and I'm getting this error, somehow tclsh 
that is installed on this OS do not wrap/hide OS incompatibilities.




tclsh /home/mingo/dev/sqlite-src-3310100/tool/mkshellc.tcl >shell.c
illegal access mode "rb"
    while executing
"open $topdir/src/shell.c.in rb"
    invoked from within
"set in [open $topdir/src/shell.c.in rb]"
    (file "/home/mingo/dev/sqlite-src-3310100/tool/mkshellc.tcl" line 32)
gmake: *** [Makefile:1079: shell.c] Error 1



Cheers !


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


Re: [sqlite] Compiling SQLite Encryption Extension for ARM processor

2020-02-13 Thread Jens Alfke


> On Feb 13, 2020, at 10:51 AM, Subodh Pathak  wrote:
> 
> I am looking for help to configure machine to compile SEE for ARM. I am
> using Android mobile Samsung G7.

You have to use a cross-compiler, a version of GCC that runs on your platform 
but generates ARM-Linux code. 
Specifically, to build for Android you should be using the Android Native 
Development Kit (NDK). The page Dr. Hipp linked to will show you how to do that.

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


Re: [sqlite] Compiling SQLite Encryption Extension for ARM processor

2020-02-13 Thread Richard Hipp
On 2/13/20, Subodh Pathak  wrote:
>
> I am trying to compile SEE for ARM processor.

There is a website explain how to compile SQLite for Android here:
https://www.sqlite.org/android/doc/trunk/www/index.wiki

Please review the instructions on that website and write again if they
do not work for you.

D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling / building SQLite to include regex

2017-12-21 Thread Keith Medcalf

Compile and load the regexp extension (ext/misc/regexp.c in the full source 
distribution or the commit tracker).  Or append the extension to SQLite3.c and 
load it, or also create a routine that does the initialization for you and 
aappend that to the SQLite3.c code as well, and use the SQLITE_EXTRA_INIT 
define so that the extra initialization routine is executed for each connection 
that is created.

In other words, you just define a function with the correct name and cause it 
to be linked and loaded, and then you will have a REGEXP function and operator.

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.


>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Paul Hoffman
>Sent: Thursday, 21 December, 2017 10:57
>To: sqlite-users@mailinglists.sqlite.org
>Subject: [sqlite] Compiling / building SQLite to include regex
>
>Greetings. I understand that SQLite doesn't come natively with regex
>support, but that it can be added. My question is how to do so when I
>install. I'm building from source from
>.
>Is there a simple recipe for "make REGEX work after installation"?
>___
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



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


Re: [sqlite] Compiling / building SQLite to include regex

2017-12-21 Thread jungle Boogie
On 21 December 2017 at 10:18, Richard Hipp  wrote:
> On 12/21/17, Paul Hoffman  wrote:
>> Greetings. I understand that SQLite doesn't come natively with regex
>> support, but that it can be added. My question is how to do so when I
>> install. I'm building from source from
>> .
>> Is there a simple recipe for "make REGEX work after installation"?
>
> There is a loadable REGEXP extension here:
> https://www.sqlite.org/src/artifact/a68d25c659bd2d89
>

And information to compile here:
https://www.sqlite.org/loadext.html

> --
> D. Richard Hipp
> d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling / building SQLite to include regex

2017-12-21 Thread Richard Hipp
On 12/21/17, Paul Hoffman  wrote:
> Greetings. I understand that SQLite doesn't come natively with regex
> support, but that it can be added. My question is how to do so when I
> install. I'm building from source from
> .
> Is there a simple recipe for "make REGEX work after installation"?

There is a loadable REGEXP extension here:
https://www.sqlite.org/src/artifact/a68d25c659bd2d89

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling on Xcode

2017-12-04 Thread Jens Alfke


> On Nov 24, 2017, at 10:14 AM, Lifepillar  wrote:
> 
> When building sqlite-amalgamation-321 using Xcode 9.1 in a newly
> created project, I get a few dozen warnings

Yup, and this is an FAQ. SQLite is very thoroughly tested but the developers do 
not use compiler warnings.

> To avoid missing potential problems in the rest of your code, I'd
> recommend suppressing the warnings only for the Release
> configuration and only for the specific target.

I recommend building SQLite as a separate static-library target, and linking 
the library into your app target. That way you can turn off warnings for SQLite 
without affecting your own code.

—Jens

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


Re: [sqlite] Compiling on Xcode

2017-11-25 Thread Lifepillar

>Hi, ALL,
>Right now my C Language option on the Xcode 5.1.1 is set to "GNU99".
>When using this option I am getting a lot of different warnings like:
>
>Value Conversion Issue
>Implicit conversion loses integer precision.
>
>I know its just a warning, but I prefer the code to be compiled clean.
>I would guess that I need a change the option to get a clean compile.
>
>Which one I should use?

Hi,
I am resurrecting this old thread, because I recently had a similar
issue and didn't find an answer in this list.

When building sqlite-amalgamation-321 using Xcode 9.1 in a newly
created project, I get a few dozen warnings, mostly about value
conversion issues as mentioned above, a few about ambiguous MIN/MAX
macro definitions, unreachable code, possible misuse of comma
operator, and one about a (not C99-compliant) over-length string.

Most warnings are easily seen to be harmless (e.g., unreachable code
depends on compile-time flags, and ambiguous macros likely depend on
merging multiple files into one—but the various macro definitions
are equivalent). Besides, I get the same warnings if I add suitable
-W flags to sqlite-autoconf-321's Makefile, which otherwise
builds cleanly. This gives me confidence that the warnings may
indeed be ignored—although I am a bit scared of ignoring “implicit
conversion loses integer precision” warnings: I'd like someone
familiar with the code to confirm that that is no cause of concern.

So, you may silence all the warnings by setting the following items
in the target's build settings:

Apple LLVM 9.0 - Warnings - All Languages
  - Implicit Conversion to 32 Bit Type: No
  - Suspicious Commas: No
  - Unreachable Code: No

Apple LLVM 9.0 - Custom Compiler Flags
  - Other Warning Flags: -Wno-ambiguous-macro -Wno-overlength-strings

To avoid missing potential problems in the rest of your code, I'd
recommend suppressing the warnings only for the Release
configuration and only for the specific target.

Hope this may be helpful to others as well,
Life.


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


Re: [sqlite] compiling for android

2017-09-11 Thread Christian Czech

Hi,

it guess it must be some special settings. We used sqlite quite some 
time now and the last build problem we got with ndk is quite long time ago.


Regards,
Christian

---
derago e. K., Gartenstr. 4, D-79807 Lottstetten, Amtsgericht Freiburg/Br. 
HRA621012, weitere Informationen unter http://www.derago.com/Impressum. Diese 
E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn 
Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese 
E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail 
ist nicht gestattet.

Am 11.09.2017 um 17:28 schrieb Dan Kennedy:

On 09/11/2017 05:20 AM, Mark Sibly wrote:

Hi,

I just encountered a problem trying to build the sqlite amalgamation
package for android with the latest NDK (v15.2.4203891) on windows 10.

The compiler couldn't find mmap, which was causing a ton of errors.

I solved it by sticking this at the top-ish of sqlite3.c

#if __ANDROID__
#include 
#endif


Thanks for reporting this. Which version are you trying to build?

Are you building with any special options - SQLITE_OMIT_WAL or similar?

When things are working right, sys/mman.h should be included if 
required by the amalgamation equivalent of this line:


  http://www.sqlite.org/src/artifact/489aa972ccc34?ln=99

Can you post the first couple of compiler errors?

Dan.

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


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


Re: [sqlite] compiling for android

2017-09-11 Thread Dan Kennedy

On 09/11/2017 05:20 AM, Mark Sibly wrote:

Hi,

I just encountered a problem trying to build the sqlite amalgamation
package for android with the latest NDK (v15.2.4203891) on windows 10.

The compiler couldn't find mmap, which was causing a ton of errors.

I solved it by sticking this at the top-ish of sqlite3.c

#if __ANDROID__
#include 
#endif


Thanks for reporting this. Which version are you trying to build?

Are you building with any special options - SQLITE_OMIT_WAL or similar?

When things are working right, sys/mman.h should be included if required 
by the amalgamation equivalent of this line:


  http://www.sqlite.org/src/artifact/489aa972ccc34?ln=99

Can you post the first couple of compiler errors?

Dan.

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


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-26 Thread curmudgeon
Thanks for those explanations Keith and Richard. I always thought the <> were
the ones supplied by the language.



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Compiling-spellfix-for-sqlite3-tp70656p97122.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-25 Thread Richard Damon

On 8/25/17 2:15 PM, Keith Medcalf wrote:

When the included file is in " " then the file is expected to be located relative to the current directory.  If the 
included file is in < > then it is relative to one of the directories specified in the "include search path".  This 
search may or may not include the "current directory" but to have "current directory" included, you have to 
specify the directory location specifically to the compiler -- it does not automatically look in the current directory for files 
included with the < > syntax.
This is incorrect. The Standard doesn't even require the that Standard 
define includes even actually be 'C files', and the header files don't 
need to be in 'directory'


What the standard does say is that includes specified with <> look in a 
set of implementation defined places, and that includes with "" look in 
another set of implementation defined places, with the addition that if 
it doesn't find them there, it looks in the places defined for <>


Generally, and traditionally, the <> list of places is thought of as the 
'system' include path, and the "" list of places are the user include 
path, and it is fairly normal that the "" list includes the current 
directory.



--
Richard Damon

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


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-25 Thread Keith Medcalf

When the included file is in " " then the file is expected to be located 
relative to the current directory.  If the included file is in < > then it is 
relative to one of the directories specified in the "include search path".  
This search may or may not include the "current directory" but to have "current 
directory" included, you have to specify the directory location specifically to 
the compiler -- it does not automatically look in the current directory for 
files included with the < > syntax.

So for example, GCC sets several default search locations based on the location 
of the compiler executable itself (so it can find the headers included with the 
compiler).  It then "appends" the directories specified in the INCLUDE 
environment variable to that list.  Command line options (and compilers with 
GUI interfaces will have the same options somewhere) allow the specification of 
"prepends" and "appends" to that list of directories.  Most compilers work the 
same way.

There is also a "LIB search path" that works the same way for linking the 
object files and libraries together.  GCC has defaults set according to the 
location of the compiler executable, then appends the paths found in the LIB 
environment variable, and then has Command line (located in the GUI options for 
other compilers) that let you prepend and append additional paths to the list.

The include and lib paths work the same way for almost all compilers, though 
there are a few exceptions.  For example, there is an old Fortran compiler that 
looks specifically in the "F99INCLUDE" environment variable for included 
Fortran code (actually, anything that is not a .h file), and the "INCLUDE" 
environment variable only for .h files.  Most compilers, however, only use one 
set of "include" and "lib" paths and know how to search for the files 
specifically.

Because the INCLUDE and LIB paths are a list of multiple directories to search, 
order is important.  Only the first file found matching the specified name/type 
will be used.  (Similar to the PATH environment variable on Windows used to 
search for executables).  This is why the compiler itself will usually have a 
pre-set location list as a starting point, to ensure that those files and 
libraries specific to the compiler are used in preference to any you might add 
later.

So if you were to find a copy of zlib prebuilt for your platform and compiler 
you would get at least a .h and .lib (headers and pre-compiled library file).  
You can stick those anywhere you like and add the directory where you put then 
to the INCLUDE search path (so the #include  will find it) and the LIB 
path (so you can specify that Z.LIB or whatever it is named for you) can be 
located when you add the z.lib library to be linked to your project.

In many cases these path additions are done by adding them (and may be done 
automatically for you when you install the library) to the INCLUDE and LIB 
environment variables.  That way whenever you need/reference the 
library/headers they will be found.

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.


>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of curmudgeon
>Sent: Friday, 25 August, 2017 11:35
>To: sqlite-users@mailinglists.sqlite.org
>Subject: Re: [sqlite] Compiling spellfix for sqlite3
>
>Thanks Keith, the config info is most welcome. I wasn't sure if I was
>supposed to download zlib.h the fact it was inside <> instead of ""
>but
>understand now.
>
>Is the include  in csv.c not a bug though, or is it
>again down
>to my compiler?
>
>
>
>--
>View this message in context:
>http://sqlite.1065341.n5.nabble.com/Compiling-spellfix-for-sqlite3-
>tp70656p97105.html
>Sent from the SQLite mailing list archive at Nabble.com.
>___
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



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


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-25 Thread curmudgeon
Thanks Keith, the config info is most welcome. I wasn't sure if I was
supposed to download zlib.h the fact it was inside <> instead of "" but
understand now.

Is the include  in csv.c not a bug though, or is it again down
to my compiler?



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Compiling-spellfix-for-sqlite3-tp70656p97105.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-25 Thread Keith Medcalf
uce 
Synchronous to NORMAL in WAL mode
#define SQLITE_LIKE_DOESNT_MATCH_BLOBS  1   // Disable LIKE 
matching for BLOBS
// #define SQLITE_MAX_EXPR_DEPTH   0   // Disable 
Parser Depth Checking
// #define SQLITE_OMIT_DECLTYPE1   // Omit 
Declaration Type from Cursors
// #define SQLITE_OMIT_DEPRECATED  1   // Omit 
Deprecated Code
// #define SQLITE_OMIT_PROGRESS_CALLBACK   1   // Omit 
Progress Callback loop counter
// #define SQLITE_OMIT_SHARED_CACHE1   // Omit 
Shared Cache

// Compiler and Platform specifics

#define HAVE_FDATASYNC 1
#define HAVE_GMTIME_R 1
#define HAVE_LOCALTIME_S 1
#define HAVE_USLEEP 1
#define HAVE_UTIME 1
#define HAVE_MALLOC_USABLE_SIZE 1

#if defined(_WIN32) && defined(__GNUC__)
#define UNICODE_STRING_MAX_BYTES ((WORD)65534)
#define UNICODE_STRING_MAX_CHARS (32766)
#define HAVE_ISNAN 1
#endif

#if defined(__GNUC__) && defined(SQLITE_USE_QUADMATH)
#define LONGDOUBLE_TYPE __float128
#endif
#endif
---//-- snip --//--

and that is how I end up with this after building the shell:

SQLite version 3.21.0 2017-08-25 13:34:18
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> pragma compile_options;
ALLOW_COVERING_INDEX_SCAN
ALLOW_URI_AUTHORITY
COMPILER=gcc-7.1.0
DEFAULT_CACHE_SIZE=262144
DEFAULT_FOREIGN_KEYS
DEFAULT_MMAP_SIZE=0
DEFAULT_PAGE_SIZE=4096
DEFAULT_PROXYDIR_PERMISSIONS=0755
DEFAULT_RECURSIVE_TRIGGERS
DEFAULT_WAL_AUTOCHECKPOINT=256
DEFAULT_WAL_SYNCHRONOUS=1
ENABLE_8_3_NAMES=1
ENABLE_API_ARMOR
ENABLE_COLUMN_METADATA
ENABLE_COSTMULT
ENABLE_CURSOR_HINTS
ENABLE_DBSTAT_VTAB
ENABLE_FTS3
ENABLE_FTS3_PARENTHESIS
ENABLE_FTS4
ENABLE_FTS5
ENABLE_JSON1
ENABLE_LOAD_EXTENSION
ENABLE_LOCKING_STYLE=1
ENABLE_MEMORY_MANAGEMENT
ENABLE_MEMSYS3
ENABLE_MEMSYS5
ENABLE_PREUPDATE_HOOK
ENABLE_RBU
ENABLE_RTREE
ENABLE_SESSION
ENABLE_STAT4
ENABLE_STMTVTAB
EXTRA_INIT=core_init
HAVE_ISNAN
LIKE_DOESNT_MATCH_BLOBS
MAX_ATTACHED=15
SOUNDEX
STAT4_SAMPLES=64
TEMP_STORE=2
THREADSAFE=1
USE_URI
WIN32_MALLOC

(the EXTRA_INIT being set separately so I can build an "unmodified" version 
without all the extra extensions for debugging ..)

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of curmudgeon
>Sent: Friday, 25 August, 2017 07:41
>To: sqlite-users@mailinglists.sqlite.org
>Subject: Re: [sqlite] Compiling spellfix for sqlite3
>
>While testing I appended the following code to the end of sqlite3.c.
>
>#include "csv.c"
>#include "stmt.c"
>#include "compress.c"
>#include "eval.c"
>#include "carray.c"
>
>int core_init(const char* dummy)
>{
>   int nErr = 0;
>   nErr +=
>sqlite3_auto_extension((void(*)())sqlite3_compress_init);
>   nErr += sqlite3_auto_extension((void(*)())sqlite3_eval_init);
>#ifndef SQLITE_OMIT_VIRTUALTABLE
>   nErr += sqlite3_auto_extension((void(*)())sqlite3_csv_init);
>   nErr += sqlite3_auto_extension((void(*)())sqlite3_stmt_init);
>   nErr += sqlite3_auto_extension((void(*)())sqlite3_carray_init);
>#endif
>   return nErr ? SQLITE_ERROR : SQLITE_OK;
>}
>
>
>My compiler gave the following errors/warnings.
>
>[bcc32 Error] csv.c(42): E2209 Unable to open include file
>'sqlite3ext.h'
>I fixed this error by changing  to "sqlite3ext.h"
>
>[bcc32 Error] sqlite3.c(204450): E2451 Undefined symbol
>'sqlite3_stmt_init'
>Not sure if this is to do with the fact that stmt.c is already
>present in
>sqlite3.c
>
>[bcc32 Error] compress.c(18): E2209 Unable to open include file
>'zlib.h'
>Above error appears even if I change  to "zlib.h"
>[bcc32 Warning] compress.c(54): W8065 Call to function 'compress'
>with no
>prototype
>[bcc32 Error] compress.c(55): E2451 Undefined symbol 'Z_OK'
>[bcc32 Warning] compress.c(87): W8065 Call to function 'uncompress'
>with no
>prototype
>[bcc32 Error] compress.c(88): E2451 Undefined symbol 'Z_OK'
>
>
>
>
>
>
>--
>View this message in context:
>http://sqlite.1065341.n5.nabble.com/Compiling-spellfix-for-sqlite3-
>tp70656p97100.html
>Sent from the SQLite mailing list archive at Nabble.com.
>___
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



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


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-25 Thread curmudgeon
While testing I appended the following code to the end of sqlite3.c.

#include "csv.c"
#include "stmt.c"
#include "compress.c"
#include "eval.c"
#include "carray.c"

int core_init(const char* dummy)
{
int nErr = 0;
nErr += sqlite3_auto_extension((void(*)())sqlite3_compress_init);
nErr += sqlite3_auto_extension((void(*)())sqlite3_eval_init);
#ifndef SQLITE_OMIT_VIRTUALTABLE
nErr += sqlite3_auto_extension((void(*)())sqlite3_csv_init);
nErr += sqlite3_auto_extension((void(*)())sqlite3_stmt_init);
nErr += sqlite3_auto_extension((void(*)())sqlite3_carray_init);
#endif
return nErr ? SQLITE_ERROR : SQLITE_OK;
}


My compiler gave the following errors/warnings.

[bcc32 Error] csv.c(42): E2209 Unable to open include file 'sqlite3ext.h'
I fixed this error by changing  to "sqlite3ext.h"

[bcc32 Error] sqlite3.c(204450): E2451 Undefined symbol 'sqlite3_stmt_init'
Not sure if this is to do with the fact that stmt.c is already present in
sqlite3.c

[bcc32 Error] compress.c(18): E2209 Unable to open include file 'zlib.h'
Above error appears even if I change  to "zlib.h"
[bcc32 Warning] compress.c(54): W8065 Call to function 'compress' with no
prototype
[bcc32 Error] compress.c(55): E2451 Undefined symbol 'Z_OK'
[bcc32 Warning] compress.c(87): W8065 Call to function 'uncompress' with no
prototype
[bcc32 Error] compress.c(88): E2451 Undefined symbol 'Z_OK'






--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Compiling-spellfix-for-sqlite3-tp70656p97100.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-24 Thread Dominique Devienne
On Thu, Aug 24, 2017 at 1:24 AM, Keith Medcalf  wrote:

> >On Wed, Aug 23, 2017 at 6:11 PM, Keith Medcalf 
> wrote:
> >Where's that pragma from Keith? Thanks, --DD
>
> They were added "experimentally" on July 7, 2017


Oh cool, that's great! thanks for the heads-up.


> You will note that for example the returned rows show both the builtin and
> user-defined function names,

even though one may be overriding the other in various circumstances,

and also no differentiation between scalar functions, aggregates, and no
> flags or argument numbers/types.


I hope this is added eventually, fwiw. All that info exists in the
in-memory data-model,
so there's no reason the evtable wouldn't expose it IMHO. Then again, I've
thought for years
there's no reason SQLite didn't have this pragma either, so who knows
if/when that might come :)


> They appeared in the 3.20.0 release code although turned off by default --

you need to "build your own" with the preprocessor symbol
> SQLITE_INTROSPECTION_PRAGMAS defined.
>
> The commit to trunk can be found here:
> https://www.sqlite.org/src/info/e0b6ae92adfae46f


Thanks again for the detailed info. Cheers, --DD
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-23 Thread Keith Medcalf
On Wednesday, 23 August, 2017 16:28, Dominique Devienne  
wrote:

>On Wed, Aug 23, 2017 at 6:11 PM, Keith Medcalf  wrote:

>> sqlite> pragma function_list;
>> group_concat|1
>> group_concat|1
>> julianday|1
>> julianday|1
>> nullif|1
>> nullif|1
>> sqlite_compileoption_get|1
>> sqlite_compileoption_get|1
>> current_timestamp|1
>> current_timestamp|1
>> sqlite_compileoption_used|1
>> sqlite_compileoption_used|1

>Where's that pragma from Keith? Thanks, --DD

>There's no such pragma at https://sqlite.org/pragma.html
>and below you can see it's just as good as another, which pragma
>happily ignores.

They were added "experimentally" on July 7, 2017 -- meaning they do not show up 
in the documentation yet, and presumably that the implementation may change 
(and may currently be perhaps a little buggy or inconsistent -- if it breaks 
you own both halves when you use undocumented/pre-release features).  

You will note that for example the returned rows show both the builtin and 
user-defined function names, even though one may be overriding the other in 
various circumstances, and also no differentiation between scalar functions, 
aggregates, and no flags or argument numbers/types.  However if all you are 
looking for is whether or not a certain module or function is loaded (by name) 
on a connection then it returns that information.  Anything more specific is 
not returned though -- so you have to assume that the function you want is the 
one you see.

They appeared in the 3.20.0 release code although turned off by default -- you 
need to "build your own" with the preprocessor symbol 
SQLITE_INTROSPECTION_PRAGMAS defined.

The commit to trunk can be found here:

https://www.sqlite.org/src/info/e0b6ae92adfae46f

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.





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


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-23 Thread Dominique Devienne
On Wed, Aug 23, 2017 at 6:11 PM, Keith Medcalf  wrote:

>
> sqlite> pragma function_list;
> group_concat|1
> group_concat|1
> julianday|1
> julianday|1
> nullif|1
> nullif|1
> sqlite_compileoption_get|1
> sqlite_compileoption_get|1
> current_timestamp|1
> current_timestamp|1
> sqlite_compileoption_used|1
> sqlite_compileoption_used|1
>

Where's that pragma from Keith? Thanks, --DD

There's no such pragma at https://sqlite.org/pragma.html
and below you can see it's just as good as another, which pragma happily
ignores.

I've requested at least twice on this list for this pragma to be added, so
of course you picked my interested.
Given all the other pragmas to introspect SQLite, I'm still baffled SQLite
doesn't have this one.

If it was a security concern, there are ways to mitigate it IMHO
(authorizer, register "hidden" functions, etc...).

C:\Users\ddevienne>sqlite3
SQLite version 3.10.2 2016-01-20 15:27:19
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> pragma function_list;
sqlite> pragma foobar;
sqlite>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-23 Thread curmudgeon
Thanks for the explanation Keith and the help. I've learned a lot the last
few days.



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Compiling-spellfix-for-sqlite3-tp70656p97040.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-23 Thread Keith Medcalf

Excellent!

That format is because the program that gets them is written in Python and the 
"list" format is the native "tuple" output format of Python (for the returned 
row objects).  For example, if in the command line shell you issue this command:

SQLite version 3.21.0 2017-08-21 02:20:57
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> select name as function_name, builtin from pragma_function_list() group 
by name collate nocase, builtin order by name collate nocase asc, builtin desc;
aavg|0
abs|1
acos|0
aggmd2|0
aggmd4|0
aggmd5|0
aggsha1|0
aggsha256|0
aggsha2_256|0

which is the table-valued function version of this:

sqlite> pragma function_list;
group_concat|1
group_concat|1
julianday|1
julianday|1
nullif|1
nullif|1
sqlite_compileoption_get|1
sqlite_compileoption_get|1
current_timestamp|1
current_timestamp|1
sqlite_compileoption_used|1
sqlite_compileoption_used|1



But in Python (with the standard dbapi module) if I execute something like (cn 
is the database connection object):

for row in cn.cursor().execute('select name as function_name, builtin from 
pragma_function_list() group by name collate nocase, builtin order by name 
collate nocase asc, builtin desc;'):
print('pragma_function_list() row=', row)

the printed output looks like this:

pragma_function_list() row= (u'aavg', 0)
pragma_function_list() row= (u'abs', 1)
pragma_function_list() row= (u'acos', 0)
pragma_function_list() row= (u'aggmd2', 0)
pragma_function_list() row= (u'aggmd4', 0)
pragma_function_list() row= (u'aggmd5', 0)
pragma_function_list() row= (u'aggsha1', 0)
pragma_function_list() row= (u'aggsha256', 0)
pragma_function_list() row= (u'aggsha2_256', 0)
pragma_function_list() row= (u'aggsha2_384', 0)
pragma_function_list() row= (u'aggsha2_512', 0)
pragma_function_list() row= (u'aggsha384', 0)
pragma_function_list() row= (u'aggsha3_224', 0)


The pragma's are documented on the SQLite3 documentation pages.
https://sqlite.org/pragma.html

pragma function_list;
pragma module_list;
pragma pragma_list;

are new in SQLite3 3.20.0 if you compile the amalgamation with 
SQLITE_INTROSPECTION_PRAGMAS defined.


---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of curmudgeon
>Sent: Wednesday, 23 August, 2017 02:55
>To: sqlite-users@mailinglists.sqlite.org
>Subject: Re: [sqlite] Compiling spellfix for sqlite3
>
>Keith, I finally managed to use carray this morning. The C++ builder
>IDE had
>a facility for entering conditional defines in Project|Options. I had
>noticed this before asking the question on the c++ builder forum but
>hadn't
>realised the -D part of -DSQLITE_EXTRA_INIT=cor_init wasn't required.
>
>Thanks for all your help but would you mind if I haunted you just a
>little
>bit longer to clear something up?
>
>You sent me an email with SampleExts.zip and wrote
>
>When I build my sqlite3.dll (on windows with gcc) I get the following
>functions for every connection:
>
>collation_list row = (0, u'ROT13')
>collation_list row = (1, u'NUMERICS')
>...
>
>pragma_function_list() row= (u'aavg', 0)
>pragma_function_list() row= (u'abs', 1)
>pragma_function_list() row= (u'acos', 0)
>
>
>I don't recognise the above 'list' notation and could find nothing on
>it
>when googled. Could you point me to any documentation as I would like
>to add
>some functions/collations that would be automatically attached to
>every
>database connection.
>
>
>
>
>Keith Medcalf wrote
>> On Tuesday, 22 August, 2017 09:30, curmudgeon 
>
>> tam118118@
>
>>  wrote:
>>
>>>Your cast did the trick Keith and it compiled fine once I removed
>the
>>>'-DSQLITE_EXTRA_INIT=core_init' line but I have no idea how to get
>>>that directive into the c++ builder application. I've put up a
>question
>>>on the c++ builder forum but unanswered as yet.
>>
>> Yeah, it must be in there somewhere.  Can't help though as I have a
>deadly
>> allergy to IDE's.
>>
>> In a non-GUI you would specify it as a command line option to the
>compiler
>> (actually, to the pre-processor), as in:
>>
>> gcc -DSQLITE_EXTRA_INIT=core_init sqlite3.c
>>
>> ---
>> The fact that there's a Highway to Hell but only a Stairway to
>Heaven says
>> a lot about anticipated traffic volume.
>>
>>
>>
>>
>> ___
>> sqlite-users mailing list
>
>> sqlite-users@.sqlite
>
>> http://mailinglists.sqlite.org/cgi-bin/

Re: [sqlite] Compiling spellfix for sqlite3

2017-08-23 Thread curmudgeon
Keith, I finally managed to use carray this morning. The C++ builder IDE had
a facility for entering conditional defines in Project|Options. I had
noticed this before asking the question on the c++ builder forum but hadn't
realised the -D part of -DSQLITE_EXTRA_INIT=cor_init wasn't required.

Thanks for all your help but would you mind if I haunted you just a little
bit longer to clear something up?

You sent me an email with SampleExts.zip and wrote

When I build my sqlite3.dll (on windows with gcc) I get the following
functions for every connection:

collation_list row = (0, u'ROT13')
collation_list row = (1, u'NUMERICS')
...

pragma_function_list() row= (u'aavg', 0)
pragma_function_list() row= (u'abs', 1)
pragma_function_list() row= (u'acos', 0)


I don't recognise the above 'list' notation and could find nothing on it
when googled. Could you point me to any documentation as I would like to add
some functions/collations that would be automatically attached to every
database connection.




Keith Medcalf wrote
> On Tuesday, 22 August, 2017 09:30, curmudgeon 

> tam118118@

>  wrote:
> 
>>Your cast did the trick Keith and it compiled fine once I removed the
>>'-DSQLITE_EXTRA_INIT=core_init' line but I have no idea how to get
>>that directive into the c++ builder application. I've put up a question 
>>on the c++ builder forum but unanswered as yet.
> 
> Yeah, it must be in there somewhere.  Can't help though as I have a deadly
> allergy to IDE's.
> 
> In a non-GUI you would specify it as a command line option to the compiler
> (actually, to the pre-processor), as in:
> 
> gcc -DSQLITE_EXTRA_INIT=core_init sqlite3.c
> 
> ---
> The fact that there's a Highway to Hell but only a Stairway to Heaven says
> a lot about anticipated traffic volume.
> 
> 
> 
> 
> ___
> sqlite-users mailing list

> sqlite-users@.sqlite

> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users





--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Compiling-spellfix-for-sqlite3-tp70656p97036.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-22 Thread Keith Medcalf

On Tuesday, 22 August, 2017 09:30, curmudgeon  wrote:

>Your cast did the trick Keith and it compiled fine once I removed the
>'-DSQLITE_EXTRA_INIT=core_init' line but I have no idea how to get
>that directive into the c++ builder application. I've put up a question 
>on the c++ builder forum but unanswered as yet.

Yeah, it must be in there somewhere.  Can't help though as I have a deadly 
allergy to IDE's.

In a non-GUI you would specify it as a command line option to the compiler 
(actually, to the pre-processor), as in:

gcc -DSQLITE_EXTRA_INIT=core_init sqlite3.c

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.




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


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-22 Thread curmudgeon
Your cast did the trick Keith and it compiled fine once I removed the
'-DSQLITE_EXTRA_INIT=core_init' line but I have no idea how to get that
directive into the c++ builder application. I've put up a question on the
c++ builder forum but unanswered as yet.



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Compiling-spellfix-for-sqlite3-tp70656p97028.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-21 Thread Keith Medcalf

On Monday, 21 August, 2017 11:44, curmudgeon wrote:

>Thanks Keith. I followed your instructions but I'm now getting the
>following compiler errors

>[bcc32 Error] carray.c(412): E2342 Type mismatch in parameter 'xInit'
>(wanted 'void (*)()', got 'void *')
>// on the 'nErr +=
>sqlite3_auto_extension((void*)sqlite3_carray_init); line'

This is because you are compiling with a C++ compiler and C++ is picky about 
types (or your compiler is too picky about types when processing C files).  In 
C, a void* can be used anywhere for anything -- it is a completely generic 
pointer -- and you are supposed to know what you are doing if you use one 
(since there is actually no such thing as a "void" that can be pointed at).

You need to change the cast to the expected type:

nErr += sqlite3_auto_extension((void(*)())sqlite3_carray_init);


>[bcc32 Error] carray.c(430): E2040 Declaration terminated incorrectly
>// on the '-DSQLITE_EXTRA_INIT=core_init' line

This is because these are compiler directives and do not go in the source code. 
 They are defines that you pass to the compiler as command line arguments.  IE, 
to have the equivalent of "#define SQLITE_EXTRA_INIT core_init" in effect 
before the sqlite3.c is compiled.  If your compiler has a hooey-gooey, then 
there is some place in it for you to create defines.  You need to define 
SQLITE_EXTRA_INIT=core_init.

>I assume carray.c wasn't being compiled at all the other way and
>that's why there were no errors reported. I tried wrapping the 
>carray.c code in extern "C" {...carray.c code...} in case it was 
>something to do with that but then I got a 'Declaration terminated 
>incorrectly' error on the first line which contains extern "C" {

Yeah.  Compiling C code in C++ mode is a dogs breakfast.  Actually, if 
sqlite3.c is being processed as C++ code I am surprised you are not getting 
billions of errors because many of the rules for incomplete types are different 
in C++ vs C.  When compiling C code the compiler you are using must be  
half-way C compliant and half-way C++ compliant ...





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


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-21 Thread curmudgeon
Thanks Keith. I followed your instructions but I'm now getting the following
compiler errors

[bcc32 Error] carray.c(412): E2342 Type mismatch in parameter 'xInit'
(wanted 'void (*)()', got 'void *')
// on the 'nErr += sqlite3_auto_extension((void*)sqlite3_carray_init); line'

[bcc32 Error] carray.c(430): E2040 Declaration terminated incorrectly
// on the '-DSQLITE_EXTRA_INIT=core_init' line

I assume carray.c wasn't being compiled at all the other way and that's why
there were no errors reported. I tried wrapping the carray.c code in extern
"C" {...carray.c code...} in case it was something to do with that but then
I got a 'Declaration terminated incorrectly' error on the first line which
contains extern "C" {



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Compiling-spellfix-for-sqlite3-tp70656p97006.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-21 Thread Keith Medcalf

You have to add the carray.c and core_init functions right at the end of the 
file (not inside any other code blocks).

The way you have it the carray.c is included only if SQLITE_ENABLE_STMTVTAB is 
enabled.

So it should look like this:

#endif /* SQLITE_CORE */
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */

/** End of stmt.c
/

#include carray.c

>
>
>I then added the following code to the end of carray.c
>
>int core_init(const char* dummy)
>{
>   int nErr = 0;
>
>   nErr += sqlite3_auto_extension((void*)sqlite3_carray_init);
>
>   return nErr ? SQLITE_ERROR : SQLITE_OK;
>}
>

These are specified as defines to the compiler correct?  I don't think that the 
-DSQLITE_CORE is required because technically the amalgamation sqlite3.c 
defines it automatically ... I just specify it for the greater certainty.

-DSQLITE_CORE
-DSQLITE_EXTRA_INIT=core_init


---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.


>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of curmudgeon
>Sent: Monday, 21 August, 2017 09:13
>To: sqlite-users@mailinglists.sqlite.org
>Subject: Re: [sqlite] Compiling spellfix for sqlite3
>
>Keith, I know this is an old post but it refers to something we
>discussed
>recently.
>
>I tried the following
>
>I added the #include carray.c line to just above the bottom of the
>amalgamation such that the last few lines are
>
>#include carray.c
>
>#endif /* SQLITE_CORE */
>#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
>
>/** End of stmt.c
>/
>
>
>
>I then added the following code to the end of carray.c
>
>int core_init(const char* dummy)
>{
>   int nErr = 0;
>
>   nErr += sqlite3_auto_extension((void*)sqlite3_carray_init);
>
>   return nErr ? SQLITE_ERROR : SQLITE_OK;
>}
>
>-DSQLITE_CORE
>-DSQLITE_EXTRA_INIT=core_init
>
>
>Everything compiled OK but when I tried to access carray in a query I
>got a
>"no such table" error. To be honest I had no idea where to put what
>and,
>through debugging, I know the core_init function was never entered.
>Can you
>tell me where I'm going wrong?
>
>
>
>
>--
>View this message in context:
>http://sqlite.1065341.n5.nabble.com/Compiling-spellfix-for-sqlite3-
>tp70656p97003.html
>Sent from the SQLite mailing list archive at Nabble.com.
>___
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



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


Re: [sqlite] Compiling spellfix for sqlite3

2017-08-21 Thread curmudgeon
Keith, I know this is an old post but it refers to something we discussed
recently.

I tried the following

I added the #include carray.c line to just above the bottom of the
amalgamation such that the last few lines are

#include carray.c

#endif /* SQLITE_CORE */
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */

/** End of stmt.c
/



I then added the following code to the end of carray.c

int core_init(const char* dummy)
{
int nErr = 0;

nErr += sqlite3_auto_extension((void*)sqlite3_carray_init);

return nErr ? SQLITE_ERROR : SQLITE_OK;
}

-DSQLITE_CORE
-DSQLITE_EXTRA_INIT=core_init


Everything compiled OK but when I tried to access carray in a query I got a
"no such table" error. To be honest I had no idea where to put what and,
through debugging, I know the core_init function was never entered. Can you
tell me where I'm going wrong?




--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Compiling-spellfix-for-sqlite3-tp70656p97003.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling issue

2016-08-01 Thread Miroslav Rajcic

Thanks Richard.

Regards,
  Miroslav

On 1.8.2016. 20:38, Richard Hipp wrote:

On 8/1/16, Miroslav Rajcic  wrote:

Hello,

just tried to compile "sqlite-snapshot-201607290155.tar.gz" (amalgam) on
OS X and I got these errors:

sqlite/sqlite3.c:108772: error: redefinition of typedef
'sqlite3_api_routines'
sqlite/sqlite3.c:5970: error: previous declaration of
'sqlite3_api_routines' was here

A new snapshot has been uploaded that fixes this problem.



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


Re: [sqlite] Compiling issue

2016-08-01 Thread Richard Hipp
On 8/1/16, Miroslav Rajcic  wrote:
> Hello,
>
> just tried to compile "sqlite-snapshot-201607290155.tar.gz" (amalgam) on
> OS X and I got these errors:
>
> sqlite/sqlite3.c:108772: error: redefinition of typedef
> 'sqlite3_api_routines'
> sqlite/sqlite3.c:5970: error: previous declaration of
> 'sqlite3_api_routines' was here

A new snapshot has been uploaded that fixes this problem.
-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling issue

2016-08-01 Thread Miroslav Rajcic

Sorry for the typo, correct sentence would be:
Removing the definition at line 108772 solved the problem.

Regards,
  Miroslav

On 1.8.2016. 20:25, Miroslav Rajcic wrote:

Hello,

just tried to compile "sqlite-snapshot-201607290155.tar.gz" (amalgam) 
on OS X and I got these errors:


sqlite/sqlite3.c:108772: error: redefinition of typedef 
'sqlite3_api_routines'
sqlite/sqlite3.c:5970: error: previous declaration of 
'sqlite3_api_routines' was here


Removing the error at line 108772 solved the problem.

Regards,

  Miroslav


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


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7690 / Virus Database: 4633/12725 - Release Date: 
08/01/16



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


Re: [sqlite] Compiling on Xcode

2016-07-23 Thread Igor Korot
Simon et al,

On Sat, Jul 23, 2016 at 2:20 AM, Simon Slavin  wrote:
>
> On 23 Jul 2016, at 4:26am, Igor Korot  wrote:
>
>> "Ambiguous expansion of macro MIN/MAX"
>
> Sorry, I don't recognise this problem.  I would try Googling it.

Trying to google I found this:
http://stackoverflow.com/questions/24950240/warnings-with-a-new-xcode-project-using-fmdb-sqlitecipher-and-cocoapods

So it does look like SQLite is trying to define the macro twice, but only
for the OSX..
Anybody else can comment?

Thank you.

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


Re: [sqlite] Compiling on Xcode

2016-07-23 Thread Simon Slavin

On 23 Jul 2016, at 4:26am, Igor Korot  wrote:

> "Ambiguous expansion of macro MIN/MAX"

Sorry, I don't recognise this problem.  I would try Googling it.

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


Re: [sqlite] Compiling on Xcode

2016-07-22 Thread Igor Korot
Simon,
Sorry for the long delay. I was trying to catch up on some other stuff.

On Thu, Jul 14, 2016 at 10:01 AM, Igor Korot  wrote:
> On Thu, Jul 14, 2016 at 9:38 AM, Simon Slavin  wrote:
>>
>> On 14 Jul 2016, at 12:44pm, Igor Korot  wrote:
>>
>>> Is there anything else to check?
>>
>> No.  Those look correct.  You looked at the right place and it had the right 
>> options selected.
>>
>> Although the SQLite team goes to some lengths to avoid errors which prevent 
>> compilation, trying to get rid of every warning generated under every 
>> combination of compiler/OS/hardware that SQLite is used for would be a 
>> never-ending task.
>>
>> I looked up the warning messages you're seeing.  They are all harmless to 
>> your particular way of working.  They're caused by the fact that different 
>> types are different between different compilers, even when running on the 
>> same OS and hardware.  For instance, as far as your compiler is concerned, 
>> under the 64-bit OS X "unsigned long" is a 64-bit unsigned integer but "int" 
>> is a 32-bit integer.
>>
>> There may be a set of compiler options which get rid of those messages but 
>> I'm not an expert on that level and I don't think it matters much anyway.  
>> So I think you can proceed with your setup and expect SQLite to perform 
>> without problems.
>
> OK, thx.
> There are also other warnings reported, however I'm currently at work
> and don't have access to my Mac.
>
> I will post them later to make sure that those are harmless as well.
>
> Thank you.

So the other warning I am seeing is:

"Ambiguous expansion of macro MIN/MAX"

Can those be safely ignored?

Thank you.

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


Re: [sqlite] Compiling on Xcode

2016-07-14 Thread Igor Korot
On Thu, Jul 14, 2016 at 9:38 AM, Simon Slavin  wrote:
>
> On 14 Jul 2016, at 12:44pm, Igor Korot  wrote:
>
>> Is there anything else to check?
>
> No.  Those look correct.  You looked at the right place and it had the right 
> options selected.
>
> Although the SQLite team goes to some lengths to avoid errors which prevent 
> compilation, trying to get rid of every warning generated under every 
> combination of compiler/OS/hardware that SQLite is used for would be a 
> never-ending task.
>
> I looked up the warning messages you're seeing.  They are all harmless to 
> your particular way of working.  They're caused by the fact that different 
> types are different between different compilers, even when running on the 
> same OS and hardware.  For instance, as far as your compiler is concerned, 
> under the 64-bit OS X "unsigned long" is a 64-bit unsigned integer but "int" 
> is a 32-bit integer.
>
> There may be a set of compiler options which get rid of those messages but 
> I'm not an expert on that level and I don't think it matters much anyway.  So 
> I think you can proceed with your setup and expect SQLite to perform without 
> problems.

OK, thx.
There are also other warnings reported, however I'm currently at work
and don't have access to my Mac.

I will post them later to make sure that those are harmless as well.

Thank you.

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


Re: [sqlite] Compiling on Xcode

2016-07-14 Thread Simon Slavin

On 14 Jul 2016, at 12:44pm, Igor Korot  wrote:

> Is there anything else to check?

No.  Those look correct.  You looked at the right place and it had the right 
options selected.

Although the SQLite team goes to some lengths to avoid errors which prevent 
compilation, trying to get rid of every warning generated under every 
combination of compiler/OS/hardware that SQLite is used for would be a 
never-ending task.

I looked up the warning messages you're seeing.  They are all harmless to your 
particular way of working.  They're caused by the fact that different types are 
different between different compilers, even when running on the same OS and 
hardware.  For instance, as far as your compiler is concerned, under the 64-bit 
OS X "unsigned long" is a 64-bit unsigned integer but "int" is a 32-bit integer.

There may be a set of compiler options which get rid of those messages but I'm 
not an expert on that level and I don't think it matters much anyway.  So I 
think you can proceed with your setup and expect SQLite to perform without 
problems.

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


Re: [sqlite] Compiling on Xcode

2016-07-14 Thread Igor Korot
Simon,

On Wed, Jul 13, 2016 at 11:51 PM, Simon Slavin  wrote:
>
> On 14 Jul 2016, at 4:43am, Igor Korot  wrote:
>
>> Right now my C Language option on the Xcode 5.1.1 is set to "GNU99".
>> When using this option I am getting a lot of different warnings like:
>>
>> Value Conversion Issue
>> Implicit conversion loses integer precision.
>
> Check the properties for the sqlite3.h and sqlite3.c files and make sure 
> Xcode understands that they're C code.  It has a bad habit of assuming that 
> .c files are C++ or Objective-C files.

When I select sqlite3.c in the Xcode project pane on the left, on the
right in the "Identity and Type" I see:

[quote]
Name: sqlite3.c
Type: Default - C Source
[/quote

Doing the same for sqlite3.h I get:

[quote]
Name: sqlite3.h
Type: Default - C Header
[/quote]

Is there anything else to check?

Thank you.

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


Re: [sqlite] Compiling on Xcode

2016-07-13 Thread Simon Slavin

On 14 Jul 2016, at 4:43am, Igor Korot  wrote:

> Right now my C Language option on the Xcode 5.1.1 is set to "GNU99".
> When using this option I am getting a lot of different warnings like:
> 
> Value Conversion Issue
> Implicit conversion loses integer precision.

Check the properties for the sqlite3.h and sqlite3.c files and make sure Xcode 
understands that they're C code.  It has a bad habit of assuming that .c files 
are C++ or Objective-C files.

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


Re: [sqlite] Compiling error on Cygwin on Windows 8.1: 3.8.7.4 and 3.8.8

2015-01-23 Thread Jan Nijtmans
2015-01-19 11:01 GMT+01:00 Frank Ho :
> I compiled the SQLite on the Cygwin 1.7.33 running on a Windows 8.1, here's 
> the error:
>
> .libs/sqlite3.o: In function `sqlite3ThreadProc':
> ../sqlite-autoconf-3080800/sqlite3.c:22471: undefined reference to 
> `_endthreadex'
> .libs/sqlite3.o: In function `sqlite3ThreadCreate':
> ../sqlite-autoconf-3080800/sqlite3.c:22493: undefined reference to 
> `_beginthreadex'
> collect2: error: ld returned 1 exit status

The problem is here:


For Cywin, SQLITE_MUTEX_PTHREADS should be set to 1, but in those
lines SQLITE_MUTEX_W32 is set in stead.

There was a commit which was

Any chance this will be fixed for SQLite 3.8.9?

There was a commit in SQLite which simply disables all
multi-threading for Cygwin:

that's indeed another possible 'solution' ;-)

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


Re: [sqlite] Compiling error on Cygwin on Windows 8.1: 3.8.7.4 and 3.8.8

2015-01-19 Thread Jan Nijtmans
2015-01-19 11:01 GMT+01:00 Frank Ho :
> Hi,
>
> I compiled the SQLite on the Cygwin 1.7.33 running on a Windows 8.1, here's 
> the error:
>
> .libs/sqlite3.o: In function `sqlite3ThreadProc':
> ../sqlite-autoconf-3080800/sqlite3.c:22471: undefined reference to 
> `_endthreadex'
> .libs/sqlite3.o: In function `sqlite3ThreadCreate':
> ../sqlite-autoconf-3080800/sqlite3.c:22493: undefined reference to 
> `_beginthreadex'
> collect2: error: ld returned 1 exit status

If you are interested, you can get a corrected amalgamation here:
   


An official cygwin build of SQLite 3.8.8 will be available soon.

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


Re: [sqlite] compiling for WP81

2014-11-20 Thread E. Timothy Uy
I found the issue. I call vcvarsphoneall.bat and then vcvarsall.bat again
in order to reset everything. But WindowsPhoneKitDir does not get unset,
this triggers build-all-msvc.bat to cal vcvarsphoneall once again. Probably
that segment needs to be removed from build-all-msvc.bat since it seems
that you are no longer dependent on vcvarsphoneall.bat.

On Thu, Nov 20, 2014 at 12:03 PM, E. Timothy Uy  wrote:

> It seem the problem was that I was calling vcvarsphoneall first. Though I
> am surprised the winrt build worked fine.
>
> On Thu, Nov 20, 2014 at 11:15 AM, Joe Mistachkin 
> wrote:
>
>>
>> E. Timothy Uy wrote:
>> >
>> >> Seems that when making mkkeywordhash.exe, it should be using the x86
>> lib
>> >> paths.
>> >>
>> >> On Thu, Nov 20, 2014 at 12:45 AM, E. Timothy Uy  wrote:
>> >>
>> >>> Hi, I am attempting to compile for WP81 using build-all-msvc.bat.
>> >>> However, when I initialize with vcvarsphoneall, I end up with
>> >>>
>> >
>>
>> Please try the following commands from a Visual Studio 2013 Command
>> Prompt:
>>
>> SET PLATFORMS=x86 x86_arm
>> SET NMAKE_ARGS=FOR_WINRT=1 USE_WP81_OPTS=1
>>
>> CALL tool\build-all-msvc.bat C:\path\to\output\dir
>>
>> --
>> Joe Mistachkin
>>
>> ___
>> 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


Re: [sqlite] compiling for WP81

2014-11-20 Thread E. Timothy Uy
It seem the problem was that I was calling vcvarsphoneall first. Though I
am surprised the winrt build worked fine.

On Thu, Nov 20, 2014 at 11:15 AM, Joe Mistachkin 
wrote:

>
> E. Timothy Uy wrote:
> >
> >> Seems that when making mkkeywordhash.exe, it should be using the x86 lib
> >> paths.
> >>
> >> On Thu, Nov 20, 2014 at 12:45 AM, E. Timothy Uy  wrote:
> >>
> >>> Hi, I am attempting to compile for WP81 using build-all-msvc.bat.
> >>> However, when I initialize with vcvarsphoneall, I end up with
> >>>
> >
>
> Please try the following commands from a Visual Studio 2013 Command Prompt:
>
> SET PLATFORMS=x86 x86_arm
> SET NMAKE_ARGS=FOR_WINRT=1 USE_WP81_OPTS=1
>
> CALL tool\build-all-msvc.bat C:\path\to\output\dir
>
> --
> Joe Mistachkin
>
> ___
> 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


Re: [sqlite] compiling for WP81

2014-11-20 Thread Joe Mistachkin

E. Timothy Uy wrote:
>
>> Seems that when making mkkeywordhash.exe, it should be using the x86 lib
>> paths.
>>
>> On Thu, Nov 20, 2014 at 12:45 AM, E. Timothy Uy  wrote:
>>
>>> Hi, I am attempting to compile for WP81 using build-all-msvc.bat.
>>> However, when I initialize with vcvarsphoneall, I end up with
>>>
>

Please try the following commands from a Visual Studio 2013 Command Prompt:

SET PLATFORMS=x86 x86_arm
SET NMAKE_ARGS=FOR_WINRT=1 USE_WP81_OPTS=1

CALL tool\build-all-msvc.bat C:\path\to\output\dir

--
Joe Mistachkin

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


Re: [sqlite] compiling for WP81

2014-11-20 Thread E. Timothy Uy
Seems that when making mkkeywordhash.exe, it should be using the x86 lib
paths.

On Thu, Nov 20, 2014 at 12:45 AM, E. Timothy Uy  wrote:

> Hi, I am attempting to compile for WP81 using build-all-msvc.bat. However,
> when I initialize with vcvarsphoneall, I end up with
>
> /debug
> /out:mkkeywordhash.exe
> "/LIBPATH:F:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib"
> "/LIBPATH:C:\Program Files (x86)\Windows Phone Silverlight
> Kits\8.1\lib\x86"
> mkkeywordhash.obj
> LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
> NMAKE : fatal error U1077: '"F:\Program Files (x86)\Microsoft Visual
> Studio 12.0\VC\bin\cl.EXE"' : return code '0x2'
> Stop.
> Failed to build Debug "sqlite3.dll" for platform x86_arm.
>
> Any tips on how I should do this? Should I even be using
> build-all-msvc.bat?
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling System.Data.SQLite for .NET CF 3.5 (VS2008 & WinCE 6) on x86

2014-05-09 Thread Joe Mistachkin

Eric Johnston wrote:
>
> The question is: How do I compile System.Data.SQLite for .NET CF 3.5
(VS2008)
> with a target platform of x86 for the SQLite.Interop.092.dll? 
>

The Windows CE 6.x SDKs that I've seen do not include support for the x86
platform.  Are you aware of one that does?

--
Joe Mistachkin

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


Re: [sqlite] Compiling SQLite on VxWorks 6.3 (DKM)

2014-03-01 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 28/02/14 06:37, deltuo wrote:
> i compile sqlite 3.8.3 to vxworks 6.9,  i  first compile sqlite in dkm
> and get xx.a lib file, and then test it in vip project, but meet disk
> i/o error, can you help me ? thank you , my email is del...@126.com

  http://catb.org/~esr/faqs/smart-questions.html

Roger

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.14 (GNU/Linux)

iEUEARECAAYFAlMSPxoACgkQmOOfHg372QQXIQCfT7Sa9kempGXWTYs+L6aot98I
Rw8AmJ2dp9jR0bN0FThp98ab/ZygeD0=
=T0I3
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling SQLite on VxWorks 6.3 (DKM)

2014-03-01 Thread deltuo
i compile sqlite 3.8.3 to vxworks 6.9,  i  first compile sqlite in dkm and
get xx.a lib file, and then test it in vip project, but meet disk i/o error,
can you help me ? thank you , my email is del...@126.com



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Compiling-SQLite-on-VxWorks-6-3-DKM-tp63955p74185.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] compiling the non-AMALGAMATION on visual studio

2013-10-30 Thread Joe Mistachkin

David Clark wrote:
>
> NMAKE : fatal error U1045: spawn failed : No error
> Stop.
>

>From my research, it looks like this error is caused by a 64-bit versus
32-bit issue.  What version Windows are you running?  Is it 32-bit or
64-bit?  Which ActiveTcl distribution file did you install?

--
Joe Mistachkin

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


Re: [sqlite] compiling the non-AMALGAMATION on visual studio

2013-10-30 Thread David Clark
Joe I tried you nmake line on a fresh extract of the .zip file from the 
download page and got this:
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\ro
wset.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\se
lect.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\st
atus.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\sh
ell.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\sq
lite.h.in tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\sq
lite3ext.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\sq
liteInt.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\sq
liteLimit.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\ta
ble.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\tc
lsqlite.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\to
kenize.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\tr
igger.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\ut
f.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\up
date.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\ut
il.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\va
cuum.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\vd
be.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\vd
be.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\vd
beapi.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\vd
beaux.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\vd
beblob.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\vd
bemem.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\vd
besort.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\vd
betrace.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\vd
beInt.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\vt
ab.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\wa
l.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\wa
l.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\wa
lker.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\src\wh
ere.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s1\fts1.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s1\fts1.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s1\fts1_hash.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s1\fts1_hash.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s1\fts1_porter.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s1\fts1_tokenizer.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s1\fts1_tokenizer1.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s2\fts2.c tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s2\fts2.h tsrc
        1 file(s) copied.

C:\TFS\Main\source\lib\ThirdParty\sqlite_dbg\sqlite-src-3080100>copy /Y .\ext\ft
s2\fts2_hash.c tsrc
        1 

Re: [sqlite] compiling the non-AMALGAMATION on visual studio

2013-10-29 Thread Dominique Devienne
On Mon, Oct 28, 2013 at 10:38 PM, David Clark  wrote:

> I am trying to compile the source tree on visual studio with makefile.msc
> and I get the following:
>
[...]

> Why am I doing this:
> I have a database lock error coming from a update query and I am not sure
> why.  So I want to debug into it...but debugging into
> a file bigger than 65000 lines does not work at all on visual studio 2008.
>
>

See [1] for a similar question and its solution. --DD

[1]:
http://sqlite.1065341.n5.nabble.com/Windows-Specific-2-c-files-Amalgamation-tp67626p67627.html
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] compiling the non-AMALGAMATION on visual studio

2013-10-28 Thread Joe Mistachkin

David Clark wrote:
>
> So I want to debug into it...but debugging into a file bigger than 65000
> lines does not work at all on visual studio 2008.  
>

Using the latest trunk, you can work around this issue with Visual Studio by
using the following make command:

nmake /f Makefile.msc all SPLIT_AMALGAMATION=1

--
Joe Mistachkin

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


Re: [sqlite] Compiling spellfix for sqlite3

2013-08-25 Thread Richard Hipp
On Sun, Aug 25, 2013 at 6:25 AM, Mirat Bayrak wrote:

> I needed wanted to build "did you mean this?" feature to my website. I'm
> using sqlite3 and learned that i can use spellfix module to order tables
> via levenstein.
>
> I downloaded source code of
> sqlite3 and
> compiled spellfix.c (it's inside /ext/misc/) like this:
>
> gcc -shared -fPIC -Wall -I/tmp/sqlite-src-3071700/ spellfix.c -o spellfix
>
> It compiles successfuly but when i load it into sqlite:
>
> sqlite> .load ./spellfix
>
> I'm getting this error:
>
> Error: ./spellfix: undefined symbol: sqlite3_extension_init
>

You can specify the name of the entry point as a second argument:

.load ./spellfix sqlite3_spellfix_init

The error you are getting is because SQLite is trying to use the entry
point name "sqlite3_extension_init" which is not exported by the "spellfix"
module.

SQLite will normally guess the right entry point name, if you are using a
recent version of SQLite and you name your shared library
"libspellfix.so".  I'm not sure if it can guess the right name with the
shared library being called just "spellfix" or not.  I think I would
definitely want to add the ".so" suffix at least.  But it never hurts to
play it safe and specify the entry point name explicitly.


>
> I really have very few knowledge about compiling c programs. Did i do some
> mistake about compiling or something else is happened? What should i do?
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


Re: [sqlite] Compiling spellfix for sqlite3

2013-08-25 Thread Keith Medcalf
> I downloaded source code of and compiled spellfix.c (it's inside /ext/misc/) 
> like this:
 
> gcc -shared -fPIC -Wall -I/tmp/sqlite-src-3071700/ spellfix.c -o spellfix

> It compiles successfuly but when i load it into sqlite:
 
> sqlite> .load ./spellfix
 
> I'm getting this error:
 
> Error: ./spellfix: undefined symbol: sqlite3_extension_init
 
> I really have very few knowledge about compiling c programs. Did i do
> some mistake about compiling or something else is happened? What should i do?

The init function name is sqlite3_spellfix_init

Current versions of sqlite3 should look for this name as well as the older 
generic name by default.  You can specify the entrypoint name on your .load 
command (or in the call to sqlite3_load_extension).

You can also simply append the spellfix.c (or any or all of the extensions) to 
the amalgamation code then add some code like this after that (all into the one 
amalgamation source file):

int core_init(const char* dummy)
{
int nErr = 0;

nErr += sqlite3_auto_extension((void*)sqlite3_ieee_init);
nErr += sqlite3_auto_extension((void*)sqlite3_nextchar_init);
nErr += sqlite3_auto_extension((void*)sqlite3_percentile_init);
nErr += sqlite3_auto_extension((void*)sqlite3_regexp_init);
nErr += sqlite3_auto_extension((void*)sqlite3_rot_init);

#ifndef SQLITE_OMIT_VIRTUALTABLE
nErr += sqlite3_auto_extension((void*)sqlite3_vtshim_init);
nErr += sqlite3_auto_extension((void*)sqlite3_amatch_init);
nErr += sqlite3_auto_extension((void*)sqlite3_closure_init);
nErr += sqlite3_auto_extension((void*)sqlite3_fuzzer_init);
nErr += sqlite3_auto_extension((void*)sqlite3_spellfix_init);
nErr += sqlite3_auto_extension((void*)sqlite3_wholenumber_init);
#endif

return nErr ? SQLITE_ERROR : SQLITE_OK;
}

Then add the following define when you compile the amalgamation to add the 
core_init function to the library initialization sequence.

-DSQLITE_EXTRA_INIT=core_init

So for example, you can append all the /ext/misc extensions to the end of the 
amalgamation, add the above code at the end after that, set the additional 
define when compiling, and your new sqlite3 engine will have all the extensions 
compiled in and available in every connection.




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


Re: [sqlite] Compiling SQLite for Windows Phone 8 (revised)

2013-05-29 Thread andy
> However, running inside the WinRT sandbox will introduce some complications 
> for dynamic loading

 

For whatever it’s worth, my use case seems to work okay.  I’m building my own 
extension as a DLL and am able to deploy it with a test WP8 app, load it via 
sqlite3_load_extension, and successfully use its functionality (obviously using 
my own build of SQLite with extensions enabled).  This use case also works fine 
for me on WinRT, though there I’m also able to use the official SQLite 
distribution since it doesn’t disable extensions.

 

Thanks again Joe, I really appreciate your help!

 


From: Joe Mistachkin
Sent: ‎May‎ ‎28‎, ‎2013 ‎6‎:‎36‎ ‎PM
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Compiling SQLite for Windows Phone 8 (revised)



a...@sourcegear.com wrote:
>
> Why is the default to disable extensions on WP8?
>

I'm actually not sure at this point.  Previously, it was disabled due
to lack of the necessary OS APIs.

>
> Is there something about the platform that makes extensions not work?
>

If the extensions are statically linked, things may work fine.  However,
running inside the WinRT sandbox will introduce some complications for
dynamic loading, see:

http://msdn.microsoft.com/en-us/library/windows/desktop/hh447159%28v=vs.85%2
9.aspx

--
Joe Mistachkin

___
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


Re: [sqlite] Compiling SQLite for Windows Phone 8 (revised)

2013-05-28 Thread Joe Mistachkin

a...@sourcegear.com wrote:
>
> Why is the default to disable extensions on WP8?
>

I'm actually not sure at this point.  Previously, it was disabled due
to lack of the necessary OS APIs.

>
> Is there something about the platform that makes extensions not work?
>

If the extensions are statically linked, things may work fine.  However,
running inside the WinRT sandbox will introduce some complications for
dynamic loading, see:

http://msdn.microsoft.com/en-us/library/windows/desktop/hh447159%28v=vs.85%2
9.aspx

--
Joe Mistachkin

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


Re: [sqlite] Compiling SQLite for Windows Phone 8 (revised)

2013-05-28 Thread andy
Thanks Joe!

 

It looks like SQLITE_WIN32_FILEMAPPING_API=1 is what I was missing.

 

A related question: Your command includes SQLITE_OMIT_LOAD_EXTENSION=1 and the 
official WP8 build is also built this way.  One of the reasons that I wanted to 
build it myself was to allow extension loading.  Why is the default to disable 
extensions on WP8?  Is there something about the platform that makes extensions 
not work?  With the filemapping flag defined I can build successfully with 
extensions enabled, so it’s not due to a compile-time problem such as 
unsupported APIs.  Is there a runtime issue where loading/using extensions is 
asking for trouble?  I’ll try it out in the morning and see what happens, but 
I’m curious what issue(s) might be lurking.

 

Thanks again!

 


From: Joe Mistachkin
Sent: ‎May‎ ‎28‎, ‎2013 ‎3‎:‎11‎ ‎PM
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Compiling SQLite for Windows Phone 8 (revised)



a...@sourcegear.com wrote:
>
> What do I have to do to generate one myself?  
>

Sorry, slight revision...

>From a Visual Studio 2012 Phone Tools (you'll need the WP8 SDK) command
prompt,
the following commands should work:

SET NCRTLIBPATH=%ProgramFiles(x86)%\Microsoft Visual Studio
11.0\VC\WPSDK\WP80\lib
SET NSDKLIBPATH=%ProgramFiles(x86)%\Windows Phone Kits\8.0\lib\x86

 nmake -f Makefile.msc sqlite3.dll XCOMPILE=1 USE_NATIVE_LIBPATHS=1
NO_TCL=1 FOR_WINRT=1 USE_RC=0 OPTS="-DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP
-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_WIN32_FILEMAPPING_API=1" 
 
--
Joe Mistachkin

___
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


Re: [sqlite] Compiling SQLite for Windows Phone 8 (revised)

2013-05-28 Thread Joe Mistachkin

a...@sourcegear.com wrote:
>
> What do I have to do to generate one myself?  
>

Sorry, slight revision...

>From a Visual Studio 2012 Phone Tools (you'll need the WP8 SDK) command
prompt,
the following commands should work:

SET NCRTLIBPATH=%ProgramFiles(x86)%\Microsoft Visual Studio
11.0\VC\WPSDK\WP80\lib
SET NSDKLIBPATH=%ProgramFiles(x86)%\Windows Phone Kits\8.0\lib\x86

nmake -f Makefile.msc sqlite3.dll XCOMPILE=1 USE_NATIVE_LIBPATHS=1
NO_TCL=1 FOR_WINRT=1 USE_RC=0 OPTS="-DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP
-DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_WIN32_FILEMAPPING_API=1" 
 
--
Joe Mistachkin

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


Re: [sqlite] Compiling SQLite for Windows Phone 8

2013-05-28 Thread Joe Mistachkin

a...@sourcegear.com wrote:
>
> What do I have to do to generate one myself?  
>

>From a Visual Studio 2012 Phone Tools (you'll need the WP8 SDK) command
prompt,
the following commands should work:

SET NCRTLIBPATH=%ProgramFiles(x86)%\Microsoft Visual Studio
11.0\VC\WPSDK\WP80\lib
SET NSDKLIBPATH=%ProgramFiles(x86)%\Windows Phone Kits\8.0\lib\x86

nmake -f Makefile.msc sqlite3.dll FOR_WINRT=1 USE_RC=0
OPTS="-DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -DSQLITE_OMIT_LOAD_EXTENSION=1
-DSQLITE_WIN32_FILEMAPPING_API=1" 

--
Joe Mistachkin

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


Re: [sqlite] compiling sqlite4 on ubuntu 12.04 64 bit

2013-05-23 Thread Prashant Shah
Hi,

On Thu, May 23, 2013 at 3:23 PM, Stephan Beal  wrote:
> gcc -fPIC -o libsqlite4.so -shared $(ar t libsqlite4.a)

Works :)

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


Re: [sqlite] compiling sqlite4 on ubuntu 12.04 64 bit

2013-05-23 Thread Stephan Beal
On Thu, May 23, 2013 at 11:45 AM, Prashant Shah wrote:

> Works !
>

:). That fix is in the trunk now.


> How do I build the libsqlite4.so shared object file ? There is no
> .libs folder in sqlite4
>

There currently aren't build rules for the .so, but here's a quick-hack way
to do it:

gcc -fPIC -o libsqlite4.so -shared $(ar t libsqlite4.a)

you might not need the -fPIC part - on my system it makes no difference.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] compiling sqlite4 on ubuntu 12.04 64 bit

2013-05-23 Thread Prashant Shah
Hi,

On Thu, May 23, 2013 at 3:02 PM, Stephan Beal  wrote:
> Please try:
>
> - Edit Makefile.linux-gcc and make this change:
> -TLIBS =
> +TLIBS ?=
>
> - Run: make TLIBS=-lm

Works !

How do I build the libsqlite4.so shared object file ? There is no
.libs folder in sqlite4

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


Re: [sqlite] compiling sqlite4 on ubuntu 12.04 64 bit

2013-05-23 Thread Stephan Beal
On Thu, May 23, 2013 at 11:23 AM, Stephan Beal wrote:

> The problem is that fts5func.c uses log() from math.h, which requires
> linking against -lm. A quick workaround is to copy/paste the output from
> where the build fails and add -lm to it:
>

Please try:

- Edit Makefile.linux-gcc and make this change:
-TLIBS =
+TLIBS ?=

- Run: make TLIBS=-lm

That _assumes_ you have symlinked Makefile.linux-gcc to "GNUmakefile". If
not, add "-f Makefile.linux-gcc" to the make arguments.

That works for me.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] compiling sqlite4 on ubuntu 12.04 64 bit

2013-05-23 Thread Stephan Beal
On Thu, May 23, 2013 at 7:33 AM, Prashant Shah wrote:

> libsqlite4.a(fts5func.o): In function `fts5Rank':
> /home/user/db/build/sqlite4/src/fts5func.c:159: undefined reference to
> `log'
> collect2: ld returned 1 exit status
> make: *** [sqlite4] Error 1
>

The problem is that fts5func.c uses log() from math.h, which requires
linking against -lm. A quick workaround is to copy/paste the output from
where the build fails and add -lm to it:

stephan@tiny:~/cvs/fossil/sqlite4$ gcc -g -fPIC -UNDEBUG -DDEBUG -Wall
-std=c89  -I. -I./src -I.  -I./ext/rtree -I./ext/icu -I./ext/fts3
-I./ext/async  -o sqlite4 ./src/shell.c libsqlite4.a -lm
./src/shell.c: In function 'do_meta_command':
./src/shell.c:1888:7: warning: implicit declaration of function 'pclose'
[-Wimplicit-function-declaration]
./src/shell.c:1894:7: warning: implicit declaration of function 'popen'
[-Wimplicit-function-declaration]
./src/shell.c:1894:14: warning: assignment makes pointer from integer
without a cast [enabled by default]
stephan@tiny:~/cvs/fossil/sqlite4$ ldd sqlite4
linux-gate.so.1 =>  (0xb77bd000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb7775000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb75cb000)
/lib/ld-linux.so.2 (0xb77be000)

i'll try to figure out where that fix belongs. fts5func.c says, though:

#include  /* temporary: For log() */

so i suspect that -lm is not intended to be needed long-term.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] compiling sqlite4 on ubuntu 12.04 64 bit

2013-05-22 Thread Prashant Shah
On Wed, May 22, 2013 at 7:53 PM, Stephan Beal  wrote:
> make -f GNUmakefile.linux

libsqlite4.a(fts5func.o): In function `fts5Rank':
/home/user/db/build/sqlite4/src/fts5func.c:159: undefined reference to `log'
collect2: ld returned 1 exit status
make: *** [sqlite4] Error 1
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] compiling sqlite4 on ubuntu 12.04 64 bit

2013-05-22 Thread Stephan Beal
On Wed, May 22, 2013 at 4:13 PM, Prashant Shah wrote:

> How can I compile sqlite4 ? Is there a amalgamation file available ?
>

Try:

make -f GNUmakefile.linux
or:
ln -s GNUmakefile.linux GNUmakefile
make

That "should" do it for you.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] compiling sqlite4 on ubuntu 12.04 64 bit

2013-05-22 Thread Prashant Shah
Hi,

Also, how do I build a .so file ?

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


Re: [sqlite] Compiling libtclsqlite3.so on Cygwin

2013-05-14 Thread Keith Christian
OK Warren, you've helped greatly, thanks again for the assistance, will
check other forums if the shared object / dll problems continue.

Keith


On Tue, May 14, 2013 at 10:53 AM, Warren Young  wrote:

> On 5/14/2013 09:14, Keith Christian wrote:
>
>>
>> couldn't load file "./tclsqlite3.o": Exec format error
>>
>
> From the Tcl manual: 
> http://tmml.sourceforge.net/**doc/tcl/load.html
>
> "...such as a .so file under Solaris or a DLL under Windows."
>
> Not *.o!
>
> My Tcl is awfully rusty, but I managed to get it to load with:
>
> load libsqlite3.7.16.2.dll "SQLite3"
>
> I have no idea what to do with it having loaded it.  (Again, the rust.)
>
> You're rapidly getting off-topic here, though.  There's a good chance that
> if you have further questions that they belong on a Cygwin or Tcl forum.
>
> __**_
> 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


Re: [sqlite] Compiling libtclsqlite3.so on Cygwin

2013-05-14 Thread Warren Young

On 5/14/2013 09:14, Keith Christian wrote:


couldn't load file "./tclsqlite3.o": Exec format error


From the Tcl manual: http://tmml.sourceforge.net/doc/tcl/load.html

"...such as a .so file under Solaris or a DLL under Windows."

Not *.o!

My Tcl is awfully rusty, but I managed to get it to load with:

load libsqlite3.7.16.2.dll "SQLite3"

I have no idea what to do with it having loaded it.  (Again, the rust.)

You're rapidly getting off-topic here, though.  There's a good chance 
that if you have further questions that they belong on a Cygwin or Tcl 
forum.

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


Re: [sqlite] Compiling libtclsqlite3.so on Cygwin

2013-05-14 Thread Keith Christian
Warren, thanks, that built the tclsqlite3.o correctly, and a libsqlite3
file also:

-rw-r--r--  1 kchristian Domain Users  39279 May 14 08:47 tclsqlite3.o
-rwxr-xr-x  1 kchristian Domain Users 173214 May 14 08:47
libsqlite3.7.16.2.dll



Another question, with a small test script, this error is output script:

couldn't load file "./tclsqlite3.o": Exec format error
while executing
"load ./tclsqlite3.o"
(file "./test_tclsqlite3.tcl" line 2)


=TEST SCRIPT START==
#!/usr/bin/tclsh
load ./tclsqlite3.o

sqlite3 db1 ./tcl_interface.db

db1 eval {CREATE TABLE IF NOT EXISTS t1(a int, b text)}
db1 eval {INSERT INTO t1 VALUES('1','hello')}
db1 eval {INSERT INTO t1 VALUES('2','goodbye')}
db1 eval {INSERT INTO t1 VALUES('3','howdy!')}

set x [db1 eval {SELECT * FROM t1 ORDER BY a}]

db1 eval {SELECT * FROM t1 ORDER BY a} values {
parray values
puts ""
}
=TEST SCRIPT END


Any suggestions for this one?  (Had to chmod u+x tclsqlite3.o, otherwise
got: 'couldn't load file "./tclsqlite3.o": Permission denied' error.)

Thanks again.





On Mon, May 13, 2013 at 8:10 PM, Warren Young  wrote:

> On 5/13/2013 16:36, Keith Christian wrote:
>
>> gcc -o libtclsqlite3.so -shared tea/generic/tclsqlite3.c -lpthread -ldl
>> -ltcl
>>
>
> Don't build it that way.  It appears that the TEA build system sees Cygwin
> and thinks "oh, this is Windows, so it must be VC++ or MinGW". That
> prevents it from linking to the Cygwin SQLite library.
>
> This seems to do the right thing:
>
> ... at the top-level of the source tree:
> $ cd tea
> $ ./configure --with-system-sqlite
> $ make
>
> Do a "make clean" before the last step if you have any *.o files laying
> around.  The shipped build system isn't smart enough to rebuild everything
> when you reconfigure with a very different set of compile and link options.
> __**_
> 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


Re: [sqlite] Compiling libtclsqlite3.so on Cygwin

2013-05-13 Thread Warren Young

On 5/13/2013 16:36, Keith Christian wrote:

gcc -o libtclsqlite3.so -shared tea/generic/tclsqlite3.c -lpthread -ldl
-ltcl


Don't build it that way.  It appears that the TEA build system sees 
Cygwin and thinks "oh, this is Windows, so it must be VC++ or MinGW". 
That prevents it from linking to the Cygwin SQLite library.


This seems to do the right thing:

... at the top-level of the source tree:
$ cd tea
$ ./configure --with-system-sqlite
$ make

Do a "make clean" before the last step if you have any *.o files laying 
around.  The shipped build system isn't smart enough to rebuild 
everything when you reconfigure with a very different set of compile and 
link options.

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


Re: [sqlite] compiling tools for winrt

2013-01-09 Thread Joe Mistachkin

E. Timothy Uy wrote:
> 
> Hi, in xcompiling tools for winrt I get the errors below. I suspect this
> because I am using the vcvars for cross compiling winrt. Is there a way to
> make this work? 
> 

In order to build for WinRT, extra options are required on the NMAKE command
line.  Here is an example:

nmake /f Makefile.msc sqlite3.dll FOR_WINRT=1

--
Joe Mistachkin

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


Re: [sqlite] compiling tools for winrt

2013-01-09 Thread E. Timothy Uy
Thanks Dimiter. I ended up making this change in Makefile.msc

165 165 !IFNDEF NSDKLIBPATH
166 -NSDKLIBPATH = $(WINDOWSSDKDIR)\lib
166 +NSDKLIBPATH = $(WINDOWSSDKDIR)\Lib\win8\um\x86
167 167 !ENDIF


On Wed, Jan 9, 2013 at 4:07 PM, Dimiter 'malkia' Stanev wrote:

> This looks like general compile problem.
>
> The imported functions below are found in kernel32.dll (kernel32.lib
> import library). But I'm not sure whether under WinRT kernel32.dll is still
> used (it might be).
>
> If you can either add kernel32.lib to your link flags, or with pragma
>
> #ifdef _MSC_VER
> #pragma comment(lib, "kernel32.lib")
> #endif
>
>
> On 1/9/2013 3:04 PM, E. Timothy Uy wrote:
>
>> Hi, in xcompiling tools for winrt I get the errors below. I suspect this
>> because I am using the vcvars for cross compiling winrt. Is there a way to
>> make this work?
>>
>> MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol
>> __imp__IsDebuggerPresent@0 referenced in function
>> ___raise_securityfailure
>> MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol
>> _IsProcessorFeaturePresent@4 referenced in function ___report_gsfailure
>> MSVCRT.lib(crtexe.obj) : error LNK2019: unresolved external symbol
>> __imp__EncodePointer@4 referenced in function _pre_c_init
>> MSVCRT.lib(atonexit.obj) : error LNK2001: unresolved external symbol
>> __imp__EncodePointer@4
>> MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
>> __imp__**QueryPerformanceCounter@4 referenced in function
>> ___security_init_cookie
>> MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
>> __imp__GetCurrentProcessId@0 referenced in function
>> ___security_init_cookie
>> MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
>> __imp__GetCurrentThreadId@0 referenced in function
>> ___security_init_cookie
>> MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
>> __imp__**GetSystemTimeAsFileTime@4 referenced in function
>> ___security_init_cookie
>> MSVCRT.lib(atonexit.obj) : error LNK2019: unresolved external symbol
>> __imp__DecodePointer@4 referenced in function __onexit
>> mkkeywordhash.exe : fatal error LNK1120: 8 unresolved externals
>> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
>> Studio
>> 11.0\VC\bin\cl.exe"' : return code '0x2'
>> Stop.
>>
>>  __**_
> 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


Re: [sqlite] compiling tools for winrt

2013-01-09 Thread Dimiter 'malkia' Stanev

This looks like general compile problem.

The imported functions below are found in kernel32.dll (kernel32.lib 
import library). But I'm not sure whether under WinRT kernel32.dll is 
still used (it might be).


If you can either add kernel32.lib to your link flags, or with pragma

#ifdef _MSC_VER
#pragma comment(lib, "kernel32.lib")
#endif

On 1/9/2013 3:04 PM, E. Timothy Uy wrote:

Hi, in xcompiling tools for winrt I get the errors below. I suspect this
because I am using the vcvars for cross compiling winrt. Is there a way to
make this work?

MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol
__imp__IsDebuggerPresent@0 referenced in function ___raise_securityfailure
MSVCRT.lib(gs_report.obj) : error LNK2019: unresolved external symbol
_IsProcessorFeaturePresent@4 referenced in function ___report_gsfailure
MSVCRT.lib(crtexe.obj) : error LNK2019: unresolved external symbol
__imp__EncodePointer@4 referenced in function _pre_c_init
MSVCRT.lib(atonexit.obj) : error LNK2001: unresolved external symbol
__imp__EncodePointer@4
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
__imp__QueryPerformanceCounter@4 referenced in function
___security_init_cookie
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
__imp__GetCurrentProcessId@0 referenced in function ___security_init_cookie
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
__imp__GetCurrentThreadId@0 referenced in function ___security_init_cookie
MSVCRT.lib(gs_support.obj) : error LNK2019: unresolved external symbol
__imp__GetSystemTimeAsFileTime@4 referenced in function
___security_init_cookie
MSVCRT.lib(atonexit.obj) : error LNK2019: unresolved external symbol
__imp__DecodePointer@4 referenced in function __onexit
mkkeywordhash.exe : fatal error LNK1120: 8 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\bin\cl.exe"' : return code '0x2'
Stop.


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


Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-03 Thread Jonas Malaco Filho
Actually, on MSVC 2010 I just got the following errors with /W3:

-- Rebuild All started: Project: Shell, Configuration: Release x64
--
  shell.c
  sqlite3.c
..\src\sqlite3.c(78502): warning C4244: 'initializing' : conversion from
'sqlite_int64' to 'tRowcnt', possible loss of data
..\src\sqlite3.c(78503): warning C4244: 'initializing' : conversion from
'sqlite_int64' to 'tRowcnt', possible loss of data
..\src\sqlite3.c(78504): warning C4244: 'initializing' : conversion from
'sqlite_int64' to 'tRowcnt', possible loss of data
..\src\sqlite3.c(104145): warning C4244: '=' : conversion from 'i64' to
'double', possible loss of data
..\src\sqlite3.c(104170): warning C4244: '=' : conversion from 'i64' to
'double', possible loss of data
  Generating code
  Finished generating code
  Shell.vcxproj ->
X:\jonas-malaco-filho\lib\SQLite\Shell\..\bin\x86-64\sqlite3.exe
-- Rebuild All started: Project: Shell, Configuration: Release Win32
--
  shell.c
  sqlite3.c
..\src\sqlite3.c(78502): warning C4244: 'initializing' : conversion from
'sqlite_int64' to 'tRowcnt', possible loss of data
..\src\sqlite3.c(78503): warning C4244: 'initializing' : conversion from
'sqlite_int64' to 'tRowcnt', possible loss of data
..\src\sqlite3.c(78504): warning C4244: 'initializing' : conversion from
'sqlite_int64' to 'tRowcnt', possible loss of data
..\src\sqlite3.c(104145): warning C4244: '=' : conversion from 'i64' to
'double', possible loss of data
..\src\sqlite3.c(104170): warning C4244: '=' : conversion from 'i64' to
'double', possible loss of data
  Generating code
  Finished generating code
  Shell.vcxproj ->
X:\jonas-malaco-filho\lib\SQLite\Shell\..\bin\x86\sqlite3.exe
== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==


*Jonas Malaco Filho*



2012/11/3 Black, Michael (IS) <michael.bla...@ngc.com>

> You probably have the warning level turned up high.
>
> Up to level 3 it compiles without warnings.  Level 4 starts complaining
> loudly.
>
>
> Michael D. Black
> Senior Scientist
> Advanced Analytics Directorate
> Advanced GEOINT Solutions Operating Unit
> Northrop Grumman Information Systems
>
> 
> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org]
> on behalf of Igor Korot [ikoro...@gmail.com]
> Sent: Friday, November 02, 2012 6:25 PM
> To: General Discussion of SQLite Database
> Subject: EXT :Re: [sqlite] Compiling SQLite3 with MSVC 2010
>
> Richard,
>
> On Fri, Nov 2, 2012 at 4:14 PM, Richard Hipp <d...@sqlite.org> wrote:
> > On Fri, Nov 2, 2012 at 7:05 PM, Igor Korot <ikoro...@gmail.com> wrote:
> >
> >> Hi, ALL,
> >> Is anybody trying to compile SQLite with MSVC 2010?
> >>
> >
> > Tests 9e and 9f at http://www.sqlite.org/checklists/3071400#c9 were
> > performed using MSVC 2010.
> >
> >
> >>
> >> I am getting a lot of warnings.
> >> Is there any interest in fixing those?
> >>
> >
> > No.  See http://www.sqlite.org/testing.html#staticanalysis for an
> > explanation.
>
> I just read this link. Interesting information.
> IIUC, all those warnings are harmless and they do not appear on other
> platforms.
> Which means that either gcc is more forgiving or that I am trying to
> compile my
> application with some very strange configuration.
> Or maybe it's C++11 that throws the compilation off of track?
>
> I'm just trying to understand why those warnings appear and why nobody else
> see them on other platforms.
>
> Thank you.
>
> >
> >
> >>
> >> If not what is the policy of using SQLite3 code? I'm using 3.7.14
> release.
> >>
> >> Thank you.
> >> ___
> >> sqlite-users mailing list
> >> sqlite-users@sqlite.org
> >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >>
> >
> >
> >
> > --
> > D. Richard Hipp
> > d...@sqlite.org
> > ___
> > 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-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


Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-03 Thread Black, Michael (IS)
You probably have the warning level turned up high.

Up to level 3 it compiles without warnings.  Level 4 starts complaining loudly.


Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT Solutions Operating Unit
Northrop Grumman Information Systems


From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Igor Korot [ikoro...@gmail.com]
Sent: Friday, November 02, 2012 6:25 PM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Compiling SQLite3 with MSVC 2010

Richard,

On Fri, Nov 2, 2012 at 4:14 PM, Richard Hipp <d...@sqlite.org> wrote:
> On Fri, Nov 2, 2012 at 7:05 PM, Igor Korot <ikoro...@gmail.com> wrote:
>
>> Hi, ALL,
>> Is anybody trying to compile SQLite with MSVC 2010?
>>
>
> Tests 9e and 9f at http://www.sqlite.org/checklists/3071400#c9 were
> performed using MSVC 2010.
>
>
>>
>> I am getting a lot of warnings.
>> Is there any interest in fixing those?
>>
>
> No.  See http://www.sqlite.org/testing.html#staticanalysis for an
> explanation.

I just read this link. Interesting information.
IIUC, all those warnings are harmless and they do not appear on other platforms.
Which means that either gcc is more forgiving or that I am trying to compile my
application with some very strange configuration.
Or maybe it's C++11 that throws the compilation off of track?

I'm just trying to understand why those warnings appear and why nobody else
see them on other platforms.

Thank you.

>
>
>>
>> If not what is the policy of using SQLite3 code? I'm using 3.7.14 release.
>>
>> Thank you.
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>
>
>
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> 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-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-03 Thread Igor Korot
Joe,

On Fri, Nov 2, 2012 at 5:32 PM, Joe Mistachkin  wrote:
>
> Igor Korot wrote:
>>
>> Warning Level: /W4
>> Trying to compile it in the debug mode with WIN32, UNICODE,
>> Multi-threaded Debug DLL (/MDd).
>>
>
> The /W4 option produces a lot of compiler warnings, mostly related to
> perceived
> 64-bit portability issues.  These warnings are harmless and can be safely
> ignored.
>
> Also, it is possible to adjust the warning level for a single source code
> file
> within a project using Visual Studio.  In this case, the warning level for
> the
> "sqlite3.c" file should normally be set to /W3.

With /W3 all those warnings mentioned are gone,

Thank you.

>
> --
> Joe Mistachkin
>
> ___
> 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


Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-03 Thread Igor Korot
Simon,

On Fri, Nov 2, 2012 at 5:05 PM, Simon Slavin  wrote:
>
> On 2 Nov 2012, at 11:52pm, Igor Korot  wrote:
>
>> But C program should compile fine whether you use C or C++ compiler.
>>
>> Is it not?
>
> I am repeatedly told that you must tell a C compiler that .c files are C 
> files, and that .cpp files are C++ files.  Compiling a C file as if it's C++ 
> doesn't work.  Fortunately, all C++ compilers I know can compile C too.

I just change the properties for the sqlite3.c file to be interpreted
as a C file. (Right click on it->Properties->C/C++->Advanced->
Compile As->Compile As C Code).
And I still get a lot of warnings:

1>SQLite\sqlite3.c(20856): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(20858): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(20863): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(21304): warning C4244: '=' : conversion from 'long
double' to 'double', possible loss of data
1>SQLite\sqlite3.c(21307): warning C4244: '=' : conversion from 'long
double' to 'double', possible loss of data
1>SQLite\sqlite3.c(21322): warning C4244: '=' : conversion from 'long
double' to 'double', possible loss of data
1>SQLite\sqlite3.c(21324): warning C4244: '=' : conversion from 'long
double' to 'double', possible loss of data
1>SQLite\sqlite3.c(30129): warning C4232: nonstandard extension used :
'pCurrent' : address of dllimport 'AreFileApisANSI' is not static,
identity not guaranteed
1>  C:\Program Files (x86)\Microsoft
SDKs\Windows\v7.0A\include\winbase.h(10430) : see declaration of
'AreFileApisANSI'
1>SQLite\sqlite3.c(33702): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(33724): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(39611): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(42616): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(42625): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(49823): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(49924): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(53587): warning C4244: '-=' : conversion from 'int'
to 'u16', possible loss of data
1>SQLite\sqlite3.c(53940): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(56236): warning C4244: '=' : conversion from
'unsigned int' to 'u8', possible loss of data
1>SQLite\sqlite3.c(59671): warning C4244: '=' : conversion from 'int'
to 'ynVar', possible loss of data
1>SQLite\sqlite3.c(68278): warning C4244: '=' : conversion from 'int'
to 'u8', possible loss of data
1>SQLite\sqlite3.c(71987): warning C4244: '+=' : conversion from 'int'
to 'u8', possible loss of data
1>SQLite\sqlite3.c(72920): warning C4244: '=' : conversion from 'int'
to 'u16', possible loss of data
1>SQLite\sqlite3.c(74268): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(80769): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(80906): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(80912): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(80930): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(80936): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(82114): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(82276): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(82287): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(82777): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(83172): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(83719): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(88924): warning C4244: 'function' : conversion from
'int' to 'u8', possible loss of data
1>SQLite\sqlite3.c(89874): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(91106): warning C4244: 'return' : conversion from
'int' to 'u8', possible loss of data
1>SQLite\sqlite3.c(91857): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(91857): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(91857): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(92261): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(92776): warning C4244: '=' : conversion from 'int'
to 'u8', possible loss of data
1>SQLite\sqlite3.c(92877): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(92907): warning C4127: conditional expression is constant
1>SQLite\sqlite3.c(100183): warning C4244: 'function' : conversion
from 'int' to 'u8', possible loss of data
1>SQLite\sqlite3.c(113660): warning C4244: '=' : conversion from 'int'
to 'char', possible loss of data
1>c:\elance5\baseballdraft\baseballdraft\sqlite\sqlite3.c(33366):
warning C4706: assignment within conditional 

Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Igor Tandetnik
Igor Korot  wrote:
> But C program should compile fine whether you use C or C++ compiler.
> 
> Is it not?

No. A valid C program doesn't have to be a valid C++ program. As a simplest 
example, C allows implicit conversion from void* to any other pointer type, 
while C++ does not. So it's common to see things like

int* p = malloc(100 * sizeof(int));

which is valid C but invalid C++.

> Basically I'm trying to embed SQLite into C++ application and following
> advice just embedded the code in the project.

Normally, a file with .c extension would be processed by a C compiler, unless 
explicitly configured otherwise.
-- 
Igor Tandetnik

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


Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Joe Mistachkin

Igor Korot wrote:
> 
> Warning Level: /W4
> Trying to compile it in the debug mode with WIN32, UNICODE,
> Multi-threaded Debug DLL (/MDd).
> 

The /W4 option produces a lot of compiler warnings, mostly related to
perceived
64-bit portability issues.  These warnings are harmless and can be safely
ignored.

Also, it is possible to adjust the warning level for a single source code
file
within a project using Visual Studio.  In this case, the warning level for
the
"sqlite3.c" file should normally be set to /W3.

--
Joe Mistachkin

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


Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Keith Medcalf

> Fortunately, all C++ compilers I know can compile C too.

Likely because C++ is rarely anything more than syntactic sugar on standard C 
...

---
()  ascii ribbon campaign against html e-mail
/\  www.asciiribbon.org




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


Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Simon Slavin

On 2 Nov 2012, at 11:52pm, Igor Korot  wrote:

> But C program should compile fine whether you use C or C++ compiler.
> 
> Is it not?

I am repeatedly told that you must tell a C compiler that .c files are C files, 
and that .cpp files are C++ files.  Compiling a C file as if it's C++ doesn't 
work.  Fortunately, all C++ compilers I know can compile C too.

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


Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Igor Korot
Hi, Joe,

On Fri, Nov 2, 2012 at 4:34 PM, Joe Mistachkin  wrote:
>
> Igor Korot wrote:
>>
>> I just read this link. Interesting information.
>> IIUC, all those warnings are harmless and they do not appear on other
> platforms.
>> Which means that either gcc is more forgiving or that I am trying to
> compile my
>> application with some very strange configuration.
>> Or maybe it's C++11 that throws the compilation off of track?
>>
>
> Out of curiosity, what warning level and compiler options are you using?

Warning Level: /W4
Trying to compile it in the debug mode with WIN32, UNICODE,
Multi-threaded Debug DLL (/MDd).

Everything else is probably not important. If it is please do let me know.

Thank you.

>
> --
> Joe Mistachkin
>
> ___
> 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


Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Igor Korot
Richard,

On Fri, Nov 2, 2012 at 4:32 PM, Richard Hipp  wrote:
> On Fri, Nov 2, 2012 at 7:25 PM, Igor Korot  wrote:
>
>> Richard,
>>
>> On Fri, Nov 2, 2012 at 4:14 PM, Richard Hipp  wrote:
>> > On Fri, Nov 2, 2012 at 7:05 PM, Igor Korot  wrote:
>> >
>> >> Hi, ALL,
>> >> Is anybody trying to compile SQLite with MSVC 2010?
>> >>
>> >
>> > Tests 9e and 9f at http://www.sqlite.org/checklists/3071400#c9 were
>> > performed using MSVC 2010.
>> >
>> >
>> >>
>> >> I am getting a lot of warnings.
>> >> Is there any interest in fixing those?
>> >>
>> >
>> > No.  See http://www.sqlite.org/testing.html#staticanalysis for an
>> > explanation.
>>
>> I just read this link. Interesting information.
>> IIUC, all those warnings are harmless and they do not appear on other
>> platforms.
>> Which means that either gcc is more forgiving or that I am trying to
>> compile my
>> application with some very strange configuration.
>> Or maybe it's C++11 that throws the compilation off of track?
>>
>
> SQLite is written in C, not C++.   If you are trying to compile it as C++,
> then yes you will get a lot of warnings.  And there is no guarantee that
> the result will work, because that is not a configuration that we test.

Yes, I understand that.
But C program should compile fine whether you use C or C++ compiler.

Is it not?

Basically I'm trying to embed SQLite into C++ application and following
advice just embedded the code in the project.

Are you saying I shouldn't do that and use pre-compiled binaries?

Thank you.

>
>
>>
>> I'm just trying to understand why those warnings appear and why nobody else
>> see them on other platforms.
>>
>> Thank you.
>>
>> >
>> >
>> >>
>> >> If not what is the policy of using SQLite3 code? I'm using 3.7.14
>> release.
>> >>
>> >> Thank you.
>> >> ___
>> >> sqlite-users mailing list
>> >> sqlite-users@sqlite.org
>> >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>> >>
>> >
>> >
>> >
>> > --
>> > D. Richard Hipp
>> > d...@sqlite.org
>> > ___
>> > 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
>>
>
>
>
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> 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


Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Joe Mistachkin

Igor Korot wrote:
> 
> I just read this link. Interesting information.
> IIUC, all those warnings are harmless and they do not appear on other
platforms.
> Which means that either gcc is more forgiving or that I am trying to
compile my
> application with some very strange configuration.
> Or maybe it's C++11 that throws the compilation off of track?
> 

Out of curiosity, what warning level and compiler options are you using?

--
Joe Mistachkin

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


Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Richard Hipp
On Fri, Nov 2, 2012 at 7:25 PM, Igor Korot  wrote:

> Richard,
>
> On Fri, Nov 2, 2012 at 4:14 PM, Richard Hipp  wrote:
> > On Fri, Nov 2, 2012 at 7:05 PM, Igor Korot  wrote:
> >
> >> Hi, ALL,
> >> Is anybody trying to compile SQLite with MSVC 2010?
> >>
> >
> > Tests 9e and 9f at http://www.sqlite.org/checklists/3071400#c9 were
> > performed using MSVC 2010.
> >
> >
> >>
> >> I am getting a lot of warnings.
> >> Is there any interest in fixing those?
> >>
> >
> > No.  See http://www.sqlite.org/testing.html#staticanalysis for an
> > explanation.
>
> I just read this link. Interesting information.
> IIUC, all those warnings are harmless and they do not appear on other
> platforms.
> Which means that either gcc is more forgiving or that I am trying to
> compile my
> application with some very strange configuration.
> Or maybe it's C++11 that throws the compilation off of track?
>

SQLite is written in C, not C++.   If you are trying to compile it as C++,
then yes you will get a lot of warnings.  And there is no guarantee that
the result will work, because that is not a configuration that we test.


>
> I'm just trying to understand why those warnings appear and why nobody else
> see them on other platforms.
>
> Thank you.
>
> >
> >
> >>
> >> If not what is the policy of using SQLite3 code? I'm using 3.7.14
> release.
> >>
> >> Thank you.
> >> ___
> >> sqlite-users mailing list
> >> sqlite-users@sqlite.org
> >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >>
> >
> >
> >
> > --
> > D. Richard Hipp
> > d...@sqlite.org
> > ___
> > 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
>



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


Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Igor Korot
Richard,

On Fri, Nov 2, 2012 at 4:14 PM, Richard Hipp  wrote:
> On Fri, Nov 2, 2012 at 7:05 PM, Igor Korot  wrote:
>
>> Hi, ALL,
>> Is anybody trying to compile SQLite with MSVC 2010?
>>
>
> Tests 9e and 9f at http://www.sqlite.org/checklists/3071400#c9 were
> performed using MSVC 2010.
>
>
>>
>> I am getting a lot of warnings.
>> Is there any interest in fixing those?
>>
>
> No.  See http://www.sqlite.org/testing.html#staticanalysis for an
> explanation.

I just read this link. Interesting information.
IIUC, all those warnings are harmless and they do not appear on other platforms.
Which means that either gcc is more forgiving or that I am trying to compile my
application with some very strange configuration.
Or maybe it's C++11 that throws the compilation off of track?

I'm just trying to understand why those warnings appear and why nobody else
see them on other platforms.

Thank you.

>
>
>>
>> If not what is the policy of using SQLite3 code? I'm using 3.7.14 release.
>>
>> Thank you.
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>
>
>
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> 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


Re: [sqlite] Compiling SQLite3 with MSVC 2010

2012-11-02 Thread Richard Hipp
On Fri, Nov 2, 2012 at 7:05 PM, Igor Korot  wrote:

> Hi, ALL,
> Is anybody trying to compile SQLite with MSVC 2010?
>

Tests 9e and 9f at http://www.sqlite.org/checklists/3071400#c9 were
performed using MSVC 2010.


>
> I am getting a lot of warnings.
> Is there any interest in fixing those?
>

No.  See http://www.sqlite.org/testing.html#staticanalysis for an
explanation.


>
> If not what is the policy of using SQLite3 code? I'm using 3.7.14 release.
>
> Thank you.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-26 Thread Bernhard Mogens Ege
Ah, so it does! I obviously misread your previous suggestion that was spot
on.

And now it certainly works, memory db with shared cache in
System.Data.SQLite. :)

Thank you for your help. :)

-- 
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin
Sent: 25. juli 2012 22:04
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll


Please use the following and try again:

con.ProviderConnectionString = "FullUri=file::memory:?cache=shared;";

The "FullUri" property supersedes the "Data Source" property.

--
Joe Mistachkin

___
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


Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-25 Thread Joe Mistachkin

Please use the following and try again:

con.ProviderConnectionString = "FullUri=file::memory:?cache=shared;";

The "FullUri" property supersedes the "Data Source" property.

--
Joe Mistachkin

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


Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-25 Thread Bernhard Mogens Ege
Thank you for the suggestion, but I get this error when trying:

Unhandled Exception: System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. --->
System.Data.EntityException: The underlying provider failed on Open. --->
System.ArgumentException: The path is not of a legal form.
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32
maxPathLength)
   at System.IO.Path.GetFullPath(String path)
   at System.Data.SQLite.SQLiteConnection.ExpandFileName(String sourceFile)
in c:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.82.0.BETA\System.Data.SQLite\SQLiteCon
nection.cs:line 1789
...

The connectionstring I built like this:

EntityConnectionStringBuilder con = new
EntityConnectionStringBuilder();
con.Metadata =
"res://*/SQLiteModel.csdl|res://*/SQLiteModel.ssdl|res://*/SQLiteModel.msl";
con.Provider = "System.Data.SQLite";
con.ProviderConnectionString = "data
source=FullUri::memory:?cache=shared;";

Also tried:

con.ProviderConnectionString = "data
source=FullUri::memory:?cache=shared";
con.ProviderConnectionString = "data
source=FullUri::memory:;cache=shared;";
con.ProviderConnectionString = "data
source=Uri::memory:?cache=shared";
con.ProviderConnectionString = "data
source=Uri::memory:;cache=shared";
con.ProviderConnectionString = "data
source=:memory:?cache=shared";

All resulting in the same error. And of course:

con.ProviderConnectionString = "data
source=:memory:;cache=shared"; // new db is access on each open; I do have
one link open to the first one created.

Not sure what to try next...

Also, 1.0.82.0.trunk is not working well when installed. In the Server
Brower in VS2010, a path to a file cannot be entered if it contains a space.
(illegal filename error or something like that). Just thought I'd mention
it.

-- 
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin
Sent: 24. juli 2012 18:46
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll


Bernhard Mogens Ege wrote:
> 
> Has _anyone_ made ":memory:;cache=shared" work in C#/System.Data.SQLite?
> 

I think you want "FullUri=file::memory:?cache=shared;" instead (using the
code on trunk).

--
Joe Mistachkin

___
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


Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-24 Thread Joe Mistachkin

Bernhard Mogens Ege wrote:
> 
> Has _anyone_ made ":memory:;cache=shared" work in C#/System.Data.SQLite?
> 

I think you want "FullUri=file::memory:?cache=shared;" instead (using the
code
on trunk).

--
Joe Mistachkin

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


Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-24 Thread Bernhard Mogens Ege
Finally made it work, but still not automatic...

I added those projects from 1.0.81.0 but their resulting DLLs weren't copied
to the target directory. I don't know why. I could copy them manually there,
though. The DLL from SQLite.Interop.2010 was named System.Data.SQLite.dll
and I had to manually rename it to SQLite.Interop.dll and copy it to the
target directory. I kind of expected this to happen automatically. :-/

I also added SQLite.Designer.2010.

And I had to add this to my app.config:


  

  
  

  


Once I did that, my application finally could talk with SQLite 3.7.13! :D

But, alas, shared cache functionality was not available.

I guess I have to revert to using file-based sqlite3 and accept sluggish
performance. For now. At least I hope we get shared memory sqlite3 databases
for C# soon. :)

Seeing as the already tried things didn't work, I might as well revert to
the standard compiled distribution. At least it is less of a hassle to work
with. :-P
-- 
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Bernhard Mogens Ege
Sent: 24. juli 2012 14:43
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

I have now done nearly exactly as you wrote, with these differences:

I have added the project System.Data.SQLite.Linq.2010 as well and made it
depend on System.Data.SQLite.2010.

I did not disable the XML generation.

I made my project depend on System.Data.SQLite.2010 and
System.Data.SQLite.Linq.2010.

I can build the project just fine, but I cannot run it. I get this error:

Unhandled Exception: System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. --->
System.ArgumentException: The specified store provider cannot be found in
the configuration, or is not valid. ---> System.ArgumentException: Unable to
find the requested .Net Framework Data Provider.  It may not be installed.
at System.Data.Common.DbProviderFactories.GetFactory(String
providerInvariantName)   at
System.Data.EntityClient.EntityConnection.GetFactory(String providerString)

I have no other System.Data.SQLite installed on my system and hence the GAC
is does not contain SQLite.

Do I need to do something special for the actual code from SQLite to be
included in my project (i.e. 1 assembly or referenced dlls)?

--
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Bernhard Mogens Ege
Sent: 23. juli 2012 12:05
To: sqlite-users@sqlite.org
Subject: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

I am trying to figure out how to compile System.Data.SQLite and in the
process update sqlite from 3.7.12.1 to 3.7.13 as I need the shared cache
option for memory connections.

 

And when I write 'trying' I am having trouble figuring out where exactly
System.Data.SQLite picks up sqlite3.dll from. The source code doesn't
include it and the installer also doesn't include it, but it must be
somewhere.

 

Is it even safe to update System.Data.SQLite 1.0.81.0 with sqlite3.dll
3.7.13 and will the shared cache feature work?

 

Also, compiling System.Data.SQLite for .NET 4.0 results in some
warnings/errors. Are they safe to ignore?

 

Warning1   The parent file, 'SR.resx',
for file 'SR.Designer.cs' cannot be found in the project file.
System.Data.SQLite.2010

Warning2   Load of property 'OutputType'
failed.System.Data.SQLite.Module.2010

Warning3   The parent file, 'SR.resx',
for file 'SR.Designer.cs' cannot be found in the project file.
System.Data.SQLite.Module.2010

Warning4   Error 2005: Mapping
Association 'FK_InternationalOrders_OrderID_OrderID' is redundant: Its
referential integrity constraint provides sufficient information.  You can
safely delete the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
793  800  testlinq.2010

Warning5   Error 2005: Mapping
Association 'FK_OrderDetails_OrderID_OrderID' is redundant: Its referential
integrity constraint provides sufficient information.  You can safely delete
the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
801  809  testlinq.2010

Warning6   Error 2005: Mapping
Association 'FK_OrderDetails_ProductID_ProductID' is redundant: Its
referential integrity constraint provides sufficient information.  You can
safely delete the mapping information for this association.
C:\Users\bme\Doc

Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-24 Thread J Decker
also have to select x86(win32) or x64(x64) as a build type for the
interop module.  Everything else needs to build as Any CPU.

On Tue, Jul 24, 2012 at 5:42 AM, Bernhard Mogens Ege  wrote:
> I have now done nearly exactly as you wrote, with these differences:
>
> I have added the project System.Data.SQLite.Linq.2010 as well and made it
> depend on System.Data.SQLite.2010.
>
> I did not disable the XML generation.
>
> I made my project depend on System.Data.SQLite.2010 and
> System.Data.SQLite.Linq.2010.
>
> I can build the project just fine, but I cannot run it. I get this error:
>
> Unhandled Exception: System.Reflection.TargetInvocationException: Exception
> has been thrown by the target of an invocation. --->
> System.ArgumentException: The specified store provider cannot be found in
> the configuration, or is not valid. ---> System.ArgumentException: Unable to
> find the requested .Net Framework Data Provider.  It may not be installed.
> at System.Data.Common.DbProviderFactories.GetFactory(String
> providerInvariantName)   at
> System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
>
> I have no other System.Data.SQLite installed on my system and hence the GAC
> is does not contain SQLite.
>
> Do I need to do something special for the actual code from SQLite to be
> included in my project (i.e. 1 assembly or referenced dlls)?
>
> --
> Bernhard
>
> -Original Message-
> From: sqlite-users-boun...@sqlite.org
> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Bernhard Mogens Ege
> Sent: 23. juli 2012 12:05
> To: sqlite-users@sqlite.org
> Subject: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll
>
> I am trying to figure out how to compile System.Data.SQLite and in the
> process update sqlite from 3.7.12.1 to 3.7.13 as I need the shared cache
> option for memory connections.
>
>
>
> And when I write 'trying' I am having trouble figuring out where exactly
> System.Data.SQLite picks up sqlite3.dll from. The source code doesn't
> include it and the installer also doesn't include it, but it must be
> somewhere.
>
>
>
> Is it even safe to update System.Data.SQLite 1.0.81.0 with sqlite3.dll
> 3.7.13 and will the shared cache feature work?
>
>
>
> Also, compiling System.Data.SQLite for .NET 4.0 results in some
> warnings/errors. Are they safe to ignore?
>
>
>
> Warning1   The parent file, 'SR.resx',
> for file 'SR.Designer.cs' cannot be found in the project file.
> System.Data.SQLite.2010
>
> Warning2   Load of property 'OutputType'
> failed.System.Data.SQLite.Module.2010
>
> Warning3   The parent file, 'SR.resx',
> for file 'SR.Designer.cs' cannot be found in the project file.
> System.Data.SQLite.Module.2010
>
> Warning4   Error 2005: Mapping
> Association 'FK_InternationalOrders_OrderID_OrderID' is redundant: Its
> referential integrity constraint provides sufficient information.  You can
> safely delete the mapping information for this association.
> C:\Users\bme\Documents\Visual Studio
> 2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
> 793  800  testlinq.2010
>
> Warning5   Error 2005: Mapping
> Association 'FK_OrderDetails_OrderID_OrderID' is redundant: Its referential
> integrity constraint provides sufficient information.  You can safely delete
> the mapping information for this association.
> C:\Users\bme\Documents\Visual Studio
> 2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
> 801  809  testlinq.2010
>
> Warning6   Error 2005: Mapping
> Association 'FK_OrderDetails_ProductID_ProductID' is redundant: Its
> referential integrity constraint provides sufficient information.  You can
> safely delete the mapping information for this association.
> C:\Users\bme\Documents\Visual Studio
> 2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
> 810  818  testlinq.2010
>
> Warning7   The referenced component
> 'mscorlib' could not be found.
>
> Warning8   The referenced component
> 'mscorlib' could not be found.
>
>
>
> --
>
> Bernhard
>
> ___
> 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-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-24 Thread Bernhard Mogens Ege
I have now done nearly exactly as you wrote, with these differences:

I have added the project System.Data.SQLite.Linq.2010 as well and made it
depend on System.Data.SQLite.2010.

I did not disable the XML generation.

I made my project depend on System.Data.SQLite.2010 and
System.Data.SQLite.Linq.2010.

I can build the project just fine, but I cannot run it. I get this error:

Unhandled Exception: System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. --->
System.ArgumentException: The specified store provider cannot be found in
the configuration, or is not valid. ---> System.ArgumentException: Unable to
find the requested .Net Framework Data Provider.  It may not be installed.
at System.Data.Common.DbProviderFactories.GetFactory(String
providerInvariantName)   at
System.Data.EntityClient.EntityConnection.GetFactory(String providerString)

I have no other System.Data.SQLite installed on my system and hence the GAC
is does not contain SQLite.

Do I need to do something special for the actual code from SQLite to be
included in my project (i.e. 1 assembly or referenced dlls)?

-- 
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Bernhard Mogens Ege
Sent: 23. juli 2012 12:05
To: sqlite-users@sqlite.org
Subject: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

I am trying to figure out how to compile System.Data.SQLite and in the
process update sqlite from 3.7.12.1 to 3.7.13 as I need the shared cache
option for memory connections.

 

And when I write 'trying' I am having trouble figuring out where exactly
System.Data.SQLite picks up sqlite3.dll from. The source code doesn't
include it and the installer also doesn't include it, but it must be
somewhere.

 

Is it even safe to update System.Data.SQLite 1.0.81.0 with sqlite3.dll
3.7.13 and will the shared cache feature work?

 

Also, compiling System.Data.SQLite for .NET 4.0 results in some
warnings/errors. Are they safe to ignore?

 

Warning1   The parent file, 'SR.resx',
for file 'SR.Designer.cs' cannot be found in the project file.
System.Data.SQLite.2010

Warning2   Load of property 'OutputType'
failed.System.Data.SQLite.Module.2010

Warning3   The parent file, 'SR.resx',
for file 'SR.Designer.cs' cannot be found in the project file.
System.Data.SQLite.Module.2010

Warning4   Error 2005: Mapping
Association 'FK_InternationalOrders_OrderID_OrderID' is redundant: Its
referential integrity constraint provides sufficient information.  You can
safely delete the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
793  800  testlinq.2010

Warning5   Error 2005: Mapping
Association 'FK_OrderDetails_OrderID_OrderID' is redundant: Its referential
integrity constraint provides sufficient information.  You can safely delete
the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
801  809  testlinq.2010

Warning6   Error 2005: Mapping
Association 'FK_OrderDetails_ProductID_ProductID' is redundant: Its
referential integrity constraint provides sufficient information.  You can
safely delete the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
810  818  testlinq.2010

Warning7   The referenced component
'mscorlib' could not be found.

Warning8   The referenced component
'mscorlib' could not be found.

 

-- 

Bernhard

___
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


Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-24 Thread Bernhard Mogens Ege
Thank you for the suggestion.

But my binary keeps loading the System.Data.SQLite from the GAC instead of
from the project (I added a reference to the DLL from the System.Data.SQLite
project, seemed like the way to do it).

The dll hell is even worse in .NET. :-/

Has _anyone_ made ":memory:;cache=shared" work in C#/System.Data.SQLite?

The unreleased 1.0.82.0 doesn't work. 1.0.81.0 with 3.7.13 doesn't work. I
wonder what I am missing. :-/
-- 
Bernhard

-Original Message-
From: J Decker [mailto:d3c...@gmail.com] 
Sent: 24. juli 2012 02:49
To: b...@saseco.dk; General Discussion of SQLite Database
Subject: Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

On Mon, Jul 23, 2012 at 3:04 AM, Bernhard Mogens Ege <b...@saseco.dk> wrote:
> I am trying to figure out how to compile System.Data.SQLite and in the 
> process update sqlite from 3.7.12.1 to 3.7.13 as I need the shared 
> cache option for memory connections.
>
>
>
> And when I write 'trying' I am having trouble figuring out where 
> exactly System.Data.SQLite picks up sqlite3.dll from. The source code 
> doesn't include it and the installer also doesn't include it, but it 
> must be somewhere.
>

It is in there in 1.0.80.0\SQLite.Interop\src\core\sqlite3.c

You need 3 projects, the netmodule, the static sqlite library and the
system.data.sqlite project

1.0.80.0\System.Data.SQLite\System.Data.SQLite.Module.2010.csproj
1.0.80.0\SQLite.Interop\SQLite.Interop.Static.2010.vcxproj
1.0.80.0\System.Data.SQLite\System.Data.SQLite.2010.csproj

interop must depend on module
system.data.sqlite must depend on interop  (right click on a project and use
'Project Dependencies' to add the additional dependencies)

Then you can just reference system.data.sqlite.2010 in other projects

Turn off generate XML documentation in build tab of project properties of
system.data.sqlite.module project.  (otherwise it causes it to always
rebuild, and in turn all dependants of it)

Probably similar rules for more recent versions

That is if you want to include building from source in your project;
otherwise you can just use the default solution of sqlite to build a DLL and
add that as the reference.

>
>
> Is it even safe to update System.Data.SQLite 1.0.81.0 with sqlite3.dll
> 3.7.13 and will the shared cache feature work?
>
>
>
> Also, compiling System.Data.SQLite for .NET 4.0 results in some 
> warnings/errors. Are they safe to ignore?
>
>
>
> Warning1   The parent file, 'SR.resx',
> for file 'SR.Designer.cs' cannot be found in the project file.
> System.Data.SQLite.2010
>
> Warning2   Load of property
'OutputType'
> failed.System.Data.SQLite.Module.2010
>
> Warning3   The parent file, 'SR.resx',
> for file 'SR.Designer.cs' cannot be found in the project file.
> System.Data.SQLite.Module.2010
>
> Warning4   Error 2005: Mapping
> Association 'FK_InternationalOrders_OrderID_OrderID' is redundant: Its 
> referential integrity constraint provides sufficient information.  You 
> can safely delete the mapping information for this association.
> C:\Users\bme\Documents\Visual Studio
>
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
> 793  800  testlinq.2010
>
> Warning5   Error 2005: Mapping
> Association 'FK_OrderDetails_OrderID_OrderID' is redundant: Its 
> referential integrity constraint provides sufficient information.  You 
> can safely delete the mapping information for this association.
> C:\Users\bme\Documents\Visual Studio
>
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
> 801  809  testlinq.2010
>
> Warning6   Error 2005: Mapping
> Association 'FK_OrderDetails_ProductID_ProductID' is redundant: Its 
> referential integrity constraint provides sufficient information.  You 
> can safely delete the mapping information for this association.
> C:\Users\bme\Documents\Visual Studio
>
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
> 810  818  testlinq.2010
>
> Warning7   The referenced component
> 'mscorlib' could not be found.
>
> Warning8   The referenced component
> 'mscorlib' could not be found.
>
>
>
> --
>
> Bernhard
>
> ___
> 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


Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-23 Thread J Decker
On Mon, Jul 23, 2012 at 3:04 AM, Bernhard Mogens Ege  wrote:
> I am trying to figure out how to compile System.Data.SQLite and in the
> process update sqlite from 3.7.12.1 to 3.7.13 as I need the shared cache
> option for memory connections.
>
>
>
> And when I write 'trying' I am having trouble figuring out where exactly
> System.Data.SQLite picks up sqlite3.dll from. The source code doesn't
> include it and the installer also doesn't include it, but it must be
> somewhere.
>

It is in there in 1.0.80.0\SQLite.Interop\src\core\sqlite3.c

You need 3 projects, the netmodule, the static sqlite library and the
system.data.sqlite project

1.0.80.0\System.Data.SQLite\System.Data.SQLite.Module.2010.csproj
1.0.80.0\SQLite.Interop\SQLite.Interop.Static.2010.vcxproj
1.0.80.0\System.Data.SQLite\System.Data.SQLite.2010.csproj

interop must depend on module
system.data.sqlite must depend on interop  (right click on a project
and use 'Project Dependencies' to add the additional dependencies)

Then you can just reference system.data.sqlite.2010 in other projects

Turn off generate XML documentation in build tab of project properties
of system.data.sqlite.module project.  (otherwise it causes it to
always rebuild, and in turn all dependants of it)

Probably similar rules for more recent versions

That is if you want to include building from source in your project;
otherwise you can just use the default solution of sqlite to build a
DLL and add that as the reference.

>
>
> Is it even safe to update System.Data.SQLite 1.0.81.0 with sqlite3.dll
> 3.7.13 and will the shared cache feature work?
>
>
>
> Also, compiling System.Data.SQLite for .NET 4.0 results in some
> warnings/errors. Are they safe to ignore?
>
>
>
> Warning1   The parent file, 'SR.resx',
> for file 'SR.Designer.cs' cannot be found in the project file.
> System.Data.SQLite.2010
>
> Warning2   Load of property 'OutputType'
> failed.System.Data.SQLite.Module.2010
>
> Warning3   The parent file, 'SR.resx',
> for file 'SR.Designer.cs' cannot be found in the project file.
> System.Data.SQLite.Module.2010
>
> Warning4   Error 2005: Mapping
> Association 'FK_InternationalOrders_OrderID_OrderID' is redundant: Its
> referential integrity constraint provides sufficient information.  You can
> safely delete the mapping information for this association.
> C:\Users\bme\Documents\Visual Studio
> 2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
> 793  800  testlinq.2010
>
> Warning5   Error 2005: Mapping
> Association 'FK_OrderDetails_OrderID_OrderID' is redundant: Its referential
> integrity constraint provides sufficient information.  You can safely delete
> the mapping information for this association.
> C:\Users\bme\Documents\Visual Studio
> 2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
> 801  809  testlinq.2010
>
> Warning6   Error 2005: Mapping
> Association 'FK_OrderDetails_ProductID_ProductID' is redundant: Its
> referential integrity constraint provides sufficient information.  You can
> safely delete the mapping information for this association.
> C:\Users\bme\Documents\Visual Studio
> 2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
> 810  818  testlinq.2010
>
> Warning7   The referenced component
> 'mscorlib' could not be found.
>
> Warning8   The referenced component
> 'mscorlib' could not be found.
>
>
>
> --
>
> Bernhard
>
> ___
> 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


  1   2   3   4   >