Re: [sqlite] [lcc32] "sqlite3.c:6597 Character constant taken as not signed"

2010-05-21 Thread Rich Rattanni
BloodShed Dev-C++ and ming?  My choice for windows development.

On Fri, May 21, 2010 at 11:01 AM, Richard Hipp  wrote:
> On Fri, May 21, 2010 at 7:43 AM, Gilles Ganault wrote:
>
>>
>> But when hitting "Compiler > Make" in the Wedit IDE, I get the
>> following errors:
>> =
>> Error c:\lcc\projects\sqlite\sqlite3.c 12462 Compiler error (trap).
>> Stopping compilation
>> =
>>
>
> This appears to be a bug in your compiler.  The compiler is segfaulting.
> Can you use a different compiler?
>
> --
> -
> 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] [lcc32] "sqlite3.c:6597 Character constant taken as not signed"

2010-05-21 Thread Richard Hipp
On Fri, May 21, 2010 at 7:43 AM, Gilles Ganault wrote:

>
> But when hitting "Compiler > Make" in the Wedit IDE, I get the
> following errors:
> =
> Error c:\lcc\projects\sqlite\sqlite3.c 12462 Compiler error (trap).
> Stopping compilation
> =
>

This appears to be a bug in your compiler.  The compiler is segfaulting.
Can you use a different compiler?

-- 
-
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] what languages

2010-05-21 Thread Matt Young
Don't forget to mention Python

On 5/21/10, Gilles Ganault  wrote:
> On Fri, 21 May 2010 15:23:13 +0200, Jean-Christophe Deschamps
>  wrote:
>>AutoIt, while a scripting language can be seen and used as a RAD
>>platform.  It enjoys good support, up to date SQLite embedding and
>>executables produced can include any file your application needs, like
>>a DB, help files.  In case you need no-installation executables and
>>mono-threaded general purpose platform for Windows with easy to lear
>>Basic-like language and a huge library, this can be a very good choice.
>
> I'll check it out along with MS VS Express. Thank you.
>
> ___
> 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] What languages can include SQLite statically?

2010-05-21 Thread Gilles Ganault
On Fri, 21 May 2010 14:34:56 +0200, "A.J.Millan"
 wrote:
>Not to say that in PHP you can't link any thing. But perhaps respond to your 
>condition of a simpler language than C that would still be able to include 
>SQLite.
>
>There you end with a single script, not an stand alone executable.

Right, but PHP would require a lot more bagage than a stand-alone
executable. I'll try the different solutions provided in this thread.

Thank you.

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


Re: [sqlite] What languages can include SQLite statically?

2010-05-21 Thread Gilles Ganault
On Fri, 21 May 2010 07:13:48 -0500, "Black, Michael (IS)"
 wrote:
>I took a look at freebasic and sqlite3 support is already included
>./examples/libraries/DB/sqlite3_test.bas
>
>And it worked for me on my Linux system.
> 
>You need to just compile sqlite3.c into a linkable library or add sqlite3.o to 
>your compile line.
> 
>So you can do
>fbc sqlite3_test.bas -lsqlite3
>Or
>fbc sqlite3_test.bas sqlite3.o
> 
>You didn't say what plafform you're running on so I assume 32-bit Windows?

Thanks a lot. I'll try to compile a prototype in FB for Windows and
see how it goes.

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


Re: [sqlite] Fw: What languages can include SQLite statically?

2010-05-21 Thread Gilles Ganault
On Fri, 21 May 2010 14:46:50 +0200, "A.J.Millan"
 wrote:
>Some time ago I used DevC++ with SQLite (it is a Ligth API that uses the GNU 
>tool chain), but if your planned target is M$, the definitive choice is 
>Visual Studio Express.

OK, I'll try to install MS VS Express on a test host.

Thanks everyone.

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


Re: [sqlite] what languages

2010-05-21 Thread Gilles Ganault
On Fri, 21 May 2010 15:23:13 +0200, Jean-Christophe Deschamps
 wrote:
>AutoIt, while a scripting language can be seen and used as a RAD 
>platform.  It enjoys good support, up to date SQLite embedding and 
>executables produced can include any file your application needs, like 
>a DB, help files.  In case you need no-installation executables and 
>mono-threaded general purpose platform for Windows with easy to lear 
>Basic-like language and a huge library, this can be a very good choice.

I'll check it out along with MS VS Express. Thank you.

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


Re: [sqlite] [lcc32] "sqlite3.c:6597 Character constant taken as notsigned"

2010-05-21 Thread Gilles Ganault
On Fri, 21 May 2010 09:23:58 -0400, Pavel Ivanov
 wrote:
>C language wasn't changed so much for the last 2 years. I'd say it
>wasn't changed at all. So I believe any even 5- or 10-year-old
>compiler will be able to do that.

I should have meant: Will this compiler include whatever libraries
SQLite might require for a successful compiling.

Or maybe the error I got with Lcc32 isn't due to some absent
dependency but is due to something else.

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


Re: [sqlite] [lcc32] "sqlite3.c:6597 Character constant taken as notsigned"

2010-05-21 Thread Pavel Ivanov
> Would this be a problem when trying to compile and link the latest
> SQLite source code?

C language wasn't changed so much for the last 2 years. I'd say it
wasn't changed at all. So I believe any even 5- or 10-year-old
compiler will be able to do that.


Pavel

On Fri, May 21, 2010 at 7:56 AM, Gilles Ganault  wrote:
> On Fri, 21 May 2010 06:49:08 -0500, "Black, Michael (IS)"
>  wrote:
>>I would recommend Code::Blocks which will give you a GUI to work with too
>>http://www.codeblocks.org/
>
> Thanks for the link. Apparently, Code::Blocks hasn't been updated in
> two years:
> http://www.codeblocks.org/downloads/binaries
>
> Would this be a problem when trying to compile and link the latest
> SQLite source code?
>
> ___
> 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] what languages

2010-05-21 Thread Jean-Christophe Deschamps

>I use sqlite from within Autoit V3 (Autoit is a windows-oriented 
>basic-like language)

AutoIt, while a scripting language can be seen and used as a RAD 
platform.  It enjoys good support, up to date SQLite embedding and 
executables produced can include any file your application needs, like 
a DB, help files.  In case you need no-installation executables and 
mono-threaded general purpose platform for Windows with easy to lear 
Basic-like language and a huge library, this can be a very good choice.

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


Re: [sqlite] What languages can include SQLite statically?

2010-05-21 Thread Arjen Markus
Hi,

On 2010-05-21 12:11, Jean-Denis Muys wrote:
> Well the answer is: any language with an external interface to the C ABI can
> link to the SQLite compiled C object code (on my planet they don't have .OBJ
> nor .LIB extensions. Perhaps we are not on the same planet) to yield an
> executable (I guess that's what you mean by 'EXE').
> 
> That include any C-family language of course: C, C++, Objective-C. Or even
> Go, though it's difficult to classify Go in the C family.
> 
> It should also be possible in Fortran for example, not that I can think of a
> good use case :-).
> 

Well, depending on your planet this can be said for any language :), but
it is indeed possible to use SQLite3 in a Fortran program. There are
actually two different bindings that I know of (one is my own - 
http://flibs.sf.net).

Regards,

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


Re: [sqlite] Fw: What languages can include SQLite statically?

2010-05-21 Thread A.J.Millan

>
> Is MS Visual Studio the recommended solution to compile present-day
> SQLite, or are there lighter, open-source compilers that I could use
> instead?
>

Some time ago I used DevC++ with SQLite (it is a Ligth API that uses the GNU 
tool chain), but if your planned target is M$, the definitive choice is 
Visual Studio Express.

A.J.Millan

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


[sqlite] what languages

2010-05-21 Thread joseph collins

I use sqlite from within Autoit V3 (Autoit is a windows-oriented basic-like 
language)

Joe



> Message: 7
> Date: Fri, 21 May 2010 11:31:30 +0200
> From: Gilles Ganault 
> Subject: [sqlite] What languages can include SQLite statically?
> To: sqlite-users@sqlite.org
> Message-ID: 
> Content-Type: text/plain; charset=us-ascii
> 
> Hello
> 
> My C skills are very basic. I was wondering: After compiling SQLite
> into an .OBJ or .LIB file, what languages can be used to include this
> output into a main program, so we end up with a single EXE.
> 
> I assume we have the choice of:
> - C
> - C++
> - Delphi (?)
> - Other?
> 
> Thank you.
> 
> 

  
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Fw: What languages can include SQLite statically?

2010-05-21 Thread Black, Michael (IS)
Hopefully my last comment on this.
 
I've been using Code::Blocks because it is cross-platform.  I develop under 
Windows and deploy under Linux.  It can also do 64-bit (takes some tweaking to 
do 64-bit on Windows).
 
MS Visual Studio Express cannot do cross-platform, or 64-bit.
 
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
 



From: sqlite-users-boun...@sqlite.org on behalf of Black, Michael (IS)
Sent: Fri 5/21/2010 7:30 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Fw: What languages can include SQLite statically?



MS Visual Studio Express should work just fine.
If you're used to MS products.

Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems




From: sqlite-users-boun...@sqlite.org on behalf of Gilles Ganault
Sent: Fri 5/21/2010 7:26 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Fw: What languages can include SQLite statically?



On Fri, 21 May 2010 14:23:04 +0200, "A.J.Millan"
 wrote:
>Due the fact that you already know C and as my 2 cents to the question,
>depending on your requirements, perhaps would have a look to PHP.
>
>As far as I know, you can use directly SQLite from that language and perhaps
>you find it simple to use; easy to port between platforms and direct and
>easy to debug.

Thanks but I'd like to pack the main application and SQLite into a
single executable, so languages like Python, PHP, etc. aren't good
solutions.

Is MS Visual Studio the recommended solution to compile present-day
SQLite, or are there lighter, open-source compilers that I could use
instead?

___
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] What languages can include SQLite statically?

2010-05-21 Thread A.J.Millan
Not to say that in PHP you can't link any thing. But perhaps respond to your 
condition of a simpler language than C that would still be able to include 
SQLite.

There you end with a single script, not an stand alone executable.

A.J.Millan

- Original Message - 
From: "Gilles Ganault" 
To: 
Sent: Friday, May 21, 2010 11:31 AM
Subject: [sqlite] What languages can include SQLite statically?


> Hello
>
> My C skills are very basic. I was wondering: After compiling SQLite
> into an .OBJ or .LIB file, what languages can be used to include this
> output into a main program, so we end up with a single EXE.
>
> I assume we have the choice of:
> - C
> - C++
> - Delphi (?)
> - Other?
>
> Thank you.
>
> ___
> 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] Fw: What languages can include SQLite statically?

2010-05-21 Thread Jean-Denis Muys
I use Xcode, which is a front end to either clang or gcc. But I usually
don't compile SQLite myself as it's a standard part of the OS. I link my
code, written in Objective-C, compiled with either compiler, with the
OS-provided libraries.

The result is a native application. No muss no fuss.

Jean-Denis



On 5/21/10 14:26 , "Gilles Ganault"  wrote:

> On Fri, 21 May 2010 14:23:04 +0200, "A.J.Millan"
>  wrote:
>> Due the fact that you already know C and as my 2 cents to the question,
>> depending on your requirements, perhaps would have a look to PHP.
>> 
>> As far as I know, you can use directly SQLite from that language and perhaps
>> you find it simple to use; easy to port between platforms and direct and
>> easy to debug.
> 
> Thanks but I'd like to pack the main application and SQLite into a
> single executable, so languages like Python, PHP, etc. aren't good
> solutions.
> 
> Is MS Visual Studio the recommended solution to compile present-day
> SQLite, or are there lighter, open-source compilers that I could use
> instead?
> 
> ___
> 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] Fw: What languages can include SQLite statically?

2010-05-21 Thread Gilles Ganault
On Fri, 21 May 2010 14:23:04 +0200, "A.J.Millan"
 wrote:
>Due the fact that you already know C and as my 2 cents to the question, 
>depending on your requirements, perhaps would have a look to PHP.
>
>As far as I know, you can use directly SQLite from that language and perhaps 
>you find it simple to use; easy to port between platforms and direct and 
>easy to debug.

Thanks but I'd like to pack the main application and SQLite into a
single executable, so languages like Python, PHP, etc. aren't good
solutions.

Is MS Visual Studio the recommended solution to compile present-day
SQLite, or are there lighter, open-source compilers that I could use
instead?

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


[sqlite] Fw: What languages can include SQLite statically?

2010-05-21 Thread A.J.Millan
Due the fact that you already know C and as my 2 cents to the question, 
depending on your requirements, perhaps would have a look to PHP.

As far as I know, you can use directly SQLite from that language and perhaps 
you find it simple to use; easy to port between platforms and direct and 
easy to debug.

HTH

A.J.Millan

- Original Message - 
From: "Gilles Ganault" 
To: 
Sent: Friday, May 21, 2010 11:31 AM
Subject: [sqlite] What languages can include SQLite statically?


> Hello
>
> My C skills are very basic. I was wondering: After compiling SQLite
> into an .OBJ or .LIB file, what languages can be used to include this
> output into a main program, so we end up with a single EXE.
>
> I assume we have the choice of:
> - C
> - C++
> - Delphi (?)
> - Other?
>
> Thank you.
>
> ___
> 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] What languages can include SQLite statically?

2010-05-21 Thread Black, Michael (IS)
I took a look at freebasic and sqlite3 support is already included
./examples/libraries/DB/sqlite3_test.bas

And it worked for me on my Linux system.
 
You need to just compile sqlite3.c into a linkable library or add sqlite3.o to 
your compile line.
 
So you can do
fbc sqlite3_test.bas -lsqlite3
Or
fbc sqlite3_test.bas sqlite3.o
 
You didn't say what plafform you're running on so I assume 32-bit Windows?
 
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
 



From: sqlite-users-boun...@sqlite.org on behalf of Black, Michael (IS)
Sent: Fri 5/21/2010 6:52 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] What languages can include SQLite statically?



Looks like somebody already did the include filesand an example 
too...hopefully works for you out-of-the-box.
http://www.freebasic.net/forum/viewtopic.php?p=101439


Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems




From: sqlite-users-boun...@sqlite.org on behalf of Gilles Ganault
Sent: Fri 5/21/2010 6:41 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What languages can include SQLite statically?



On Fri, 21 May 2010 06:28:20 -0500, "Black, Michael (IS)"
 wrote:
>It looks like FreeBasic should work
>http://www.freebasic.net/
>
>You just have to build the include file -- hopefully that's not too hard for 
>you as you probably only need a few of the functions.

I'll give it a try. Thanks everyone.

___
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] [lcc32] "sqlite3.c:6597 Character constant taken as notsigned"

2010-05-21 Thread Gilles Ganault
On Fri, 21 May 2010 06:49:08 -0500, "Black, Michael (IS)"
 wrote:
>I would recommend Code::Blocks which will give you a GUI to work with too
>http://www.codeblocks.org/

Thanks for the link. Apparently, Code::Blocks hasn't been updated in
two years:
http://www.codeblocks.org/downloads/binaries

Would this be a problem when trying to compile and link the latest
SQLite source code?

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


Re: [sqlite] What languages can include SQLite statically?

2010-05-21 Thread Black, Michael (IS)
Looks like somebody already did the include filesand an example 
too...hopefully works for you out-of-the-box.
http://www.freebasic.net/forum/viewtopic.php?p=101439
 
 
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
 



From: sqlite-users-boun...@sqlite.org on behalf of Gilles Ganault
Sent: Fri 5/21/2010 6:41 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What languages can include SQLite statically?



On Fri, 21 May 2010 06:28:20 -0500, "Black, Michael (IS)"
 wrote:
>It looks like FreeBasic should work
>http://www.freebasic.net/
>
>You just have to build the include file -- hopefully that's not too hard for 
>you as you probably only need a few of the functions.

I'll give it a try. Thanks everyone.

___
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] [lcc32] "sqlite3.c:6597 Character constant taken as not signed"

2010-05-21 Thread Gilles Ganault
Hello

I'm a C newbie, and would like to compile a small C project that will
include a main.c along with sqlite3.c and sqlite3.h (ie. the
amalgamated version of the SQLite source code). This is an alternative
to trying to use SQLite from an another language while still being
able to pack both the main app and SQLite into a single EXE.

After successfully building and running the "Hello, world" to make
sure Lcc32 was correctly installed, I simply added sqlite3.h and
sqlite3.c to the project, without any "include" since I just wanted to
check that it compiled OK:

=
int main(void)
{
printf("Hello\n");
return 0;
}
=

But when hitting "Compiler > Make" in the Wedit IDE, I get the
following errors:
=
Warning c:\lcc\projects\sqlite\sqlite3.c: 12365  Statement has no
effect
Warning c:\lcc\projects\sqlite\sqlite3.c: 12379  Statement has no
effect
Warning c:\lcc\projects\sqlite\sqlite3.c: 12393  Statement has no
effect
Error c:\lcc\projects\sqlite\sqlite3.c 12462 Compiler error (trap).
Stopping compilation
=

Google didn't return information on this error. Does someone know what
the problem is, and if not, what other open-source C compiler for
Windows I should use for this small, one-off project?

Thank you.

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


Re: [sqlite] What languages can include SQLite statically?

2010-05-21 Thread Gilles Ganault
On Fri, 21 May 2010 06:28:20 -0500, "Black, Michael (IS)"
 wrote:
>It looks like FreeBasic should work
>http://www.freebasic.net/
> 
>You just have to build the include file -- hopefully that's not too hard for 
>you as you probably only need a few of the functions.

I'll give it a try. Thanks everyone.

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


Re: [sqlite] What languages can include SQLite statically?

2010-05-21 Thread Black, Michael (IS)
It looks like FreeBasic should work
http://www.freebasic.net/
 
You just have to build the include file -- hopefully that's not too hard for 
you as you probably only need a few of the functions.
 
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
 



From: sqlite-users-boun...@sqlite.org on behalf of Gilles Ganault
Sent: Fri 5/21/2010 5:19 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] What languages can include SQLite statically?



On Fri, 21 May 2010 12:11:39 +0200, Jean-Denis Muys
 wrote:
>Well the answer is: any language with an external interface to the C ABI can
>link to the SQLite compiled C object code

Thanks for the explanation. Ideally, the executable should be a
simpler language than C that would still be able to include SQLite so
that I would end up with a single executable.

Apparently, there are two solutions:
- use C/C++, and just include sqlite.c + sqlite.h in the project
- compile the SQLite source code into OBJ, compile this OBJ with the
executable, and somehow call the SQLite functions from the main
program.

Does someone know of a BASIC-like language (ie. with an easy syntax
like Python, Lua, etc.) that can include the SQLite OBJ file?

___
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] What languages can include SQLite statically?

2010-05-21 Thread Michael Schlenker
Gilles Ganault schrieb:
> On Fri, 21 May 2010 12:11:39 +0200, Jean-Denis Muys
>  wrote:
>> Well the answer is: any language with an external interface to the C ABI can
>> link to the SQLite compiled C object code
> 
> Thanks for the explanation. Ideally, the executable should be a
> simpler language than C that would still be able to include SQLite so
> that I would end up with a single executable.
> 
> Apparently, there are two solutions:
> - use C/C++, and just include sqlite.c + sqlite.h in the project
> - compile the SQLite source code into OBJ, compile this OBJ with the
> executable, and somehow call the SQLite functions from the main
> program.
> 
> Does someone know of a BASIC-like language (ie. with an easy syntax
> like Python, Lua, etc.) that can include the SQLite OBJ file?

Well, Tcl/Tk is one solution with an easy syntax and good sqlite
support. If you used starkits/starpacks you can wrap all those things up
into single file executables on many platforms easily too.

But Python, Lua etc. have useful SQLite bindings too, so pick whatever
language you feel comfortable with, most have a working SQLite binding.

Michael

-- 
Michael Schlenker
Software Architect

CONTACT Software GmbH   Tel.:   +49 (421) 20153-80
Wiener Straße 1-3   Fax:+49 (421) 20153-41
28359 Bremen
http://www.contact.de/  E-Mail: m...@contact.de

Sitz der Gesellschaft: Bremen
Geschäftsführer: Karl Heinz Zachries, Ralf Holtgrefe
Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What languages can include SQLite statically?

2010-05-21 Thread Simon Slavin

On 21 May 2010, at 11:19am, Gilles Ganault wrote:

> Ideally, the executable should be a
> simpler language than C that would still be able to include SQLite so
> that I would end up with a single executable.

The SQLite library is provided as one long piece of C code.  Not even C++, just 
C, with a couple of includes.  So any language for which you can write 
extensions in C will handle SQLite just fine.

> Apparently, there are two solutions:
> - use C/C++, and just include sqlite.c + sqlite.h in the project

Yep.  That is the simplest way to do it and gives a compact result.

> - compile the SQLite source code into OBJ, compile this OBJ with the
> executable, and somehow call the SQLite functions from the main
> program.

Or write a little bridge which converts your programs requirements into a few 
calls to the SQLite library, then compile your bridge as a static library.

> Does someone know of a BASIC-like language (ie. with an easy syntax
> like Python, Lua, etc.) that can include the SQLite OBJ file?

Hard to know what you mean by BASIC-like, but I can name languages you can do 
this in off the top of my head, including the two you named.  For instance, get 
hold of the lua source code, and add SQLite and a few bridge functions to 
convert data from SQLite format to lua's indexed table format.

Not to mention using non-language applications and writing a plugin which 
incorporates SQLite, as you can do for Final Cut Pro, FireFox, Safari, MatLab, 
etc..  I wanted a way to call SQLite from JavaScript in Safari so I wrote a 
browser plugin.  Works fine.

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


Re: [sqlite] What languages can include SQLite statically?

2010-05-21 Thread Gilles Ganault
On Fri, 21 May 2010 12:11:39 +0200, Jean-Denis Muys
 wrote:
>Well the answer is: any language with an external interface to the C ABI can
>link to the SQLite compiled C object code

Thanks for the explanation. Ideally, the executable should be a
simpler language than C that would still be able to include SQLite so
that I would end up with a single executable.

Apparently, there are two solutions:
- use C/C++, and just include sqlite.c + sqlite.h in the project
- compile the SQLite source code into OBJ, compile this OBJ with the
executable, and somehow call the SQLite functions from the main
program.

Does someone know of a BASIC-like language (ie. with an easy syntax
like Python, Lua, etc.) that can include the SQLite OBJ file?

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


Re: [sqlite] What languages can include SQLite statically?

2010-05-21 Thread Jean-Denis Muys
Well the answer is: any language with an external interface to the C ABI can
link to the SQLite compiled C object code (on my planet they don't have .OBJ
nor .LIB extensions. Perhaps we are not on the same planet) to yield an
executable (I guess that's what you mean by 'EXE').

That include any C-family language of course: C, C++, Objective-C. Or even
Go, though it's difficult to classify Go in the C family.

It should also be possible in Fortran for example, not that I can think of a
good use case :-).

Perhaps more usefuly, Etoilé is a Smalltalk dialect using the GNU-Step ABI,
which was designed for Objective-C, so should be able to link with SQLite
directly.

I can do it with MacRuby too, since MacRuby is compiled to native code using
the standard Mac OS X ABI.

In MacRuby's tracks, it's become much easier to do so with any language,
using LLVM.

Of course, the other half of the equation is how do you call a SQLite
function from the other language. At least, that implies creating an
'interface' file from the header.

In fact it's not so much the language that's relevant here, rather the
run-time architecture your particular implementation of that language uses:
if that run-time supports a standard-compliant C compiler, then you should
be good to go.

Jean-Denis

On 5/21/10 11:31 , "Gilles Ganault"  wrote:

> Hello
> 
> My C skills are very basic. I was wondering: After compiling SQLite
> into an .OBJ or .LIB file, what languages can be used to include this
> output into a main program, so we end up with a single EXE.
> 
> I assume we have the choice of:
> - C
> - C++
> - Delphi (?)
> - Other?
> 
> Thank you.
> 
> ___
> 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] What languages can include SQLite statically?

2010-05-21 Thread Arjen Markus
Hi Gilles,

I do not quite understand why this is important to you, but the answer
is independent of SQLite itself - and it is a trifle complicated.

You can add Fortran to the list below - either a static or a dynamic
library will do fine.

If you look at Tcl, the matter becomes more complicated:
- Tcl supports static packages, in which case you can add a static
   library to the link step (and add a call to the proper Tcl functions
   to initialise it).
- Tcl also supports dynamically loading packages, in which case you
   need a dynamic library. But, and here comes the complication, you
   can also wrap the Tcl runtime executable and all (!) its dependencies
   into a single file. In fact there are various options to do so,
   for instance via Tclkit (you get a so-called starkit then).
   Does that count as a single EXE? You only need to distribute a
   single file - but there is still a dynamic library in there
   somewhere.

I am not very familiar with other dynamic languages (scripting
languages if you want), but I understand they have similar
technologies.

A language where this is definitely not possible is Java. There
you need to supply separate jar-files and native libraries. But
again, that is a matter of the _language mechanisms_, not of
SQLite. (The same for C#, if I am not grossly mistaken)

Regards,

Arjen

On 2010-05-21 11:31, Gilles Ganault wrote:
> Hello
> 
> My C skills are very basic. I was wondering: After compiling SQLite
> into an .OBJ or .LIB file, what languages can be used to include this
> output into a main program, so we end up with a single EXE.
> 
> I assume we have the choice of:
> - C
> - C++
> - Delphi (?)
> - Other?
> 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] What languages can include SQLite statically?

2010-05-21 Thread Gilles Ganault
Hello

My C skills are very basic. I was wondering: After compiling SQLite
into an .OBJ or .LIB file, what languages can be used to include this
output into a main program, so we end up with a single EXE.

I assume we have the choice of:
- C
- C++
- Delphi (?)
- Other?

Thank you.

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