Basides the mentioned option of build a .lib file and link it statically 
against your code, or a dinamic library, there are the option of include the 
sqlite3.c file in your code without so many problems with the casting of 
pointers -and some others-.

If you are using a C++ project in MS Visual Studio, the sqlite3.c file must 
be compiled as "C".

See in:   File-Properties > C/C++ > Advanced > Compile As

Select  "Compile as C Code (/TC)"

The rest of the project can remain compiled as usual C/C++ files.

Probably you must disable the use of precompiled headers also.

HTH.

A.J.Millan


> -----Original Message-----
> From: Paul Claessen paul at claessen.com
> Sat Jul 25 15:48:37 GMT 2009
> To: paul at claessen.com; General Discussion of SQLite Database
> Subject: Re: [sqlite] .lib file?
>> Two points though:

> 1. The amalgated sources were, apparently, not written with MS Visual 
> Study in mind, since compiling it results in over 100 errors
> (mostly invalid pointer conversions)
> 2. If I have a number of apps, it would really be more efficient to use 
> the DLL.

> I'm sure I can fix all the pointer casts (shouldn't be necessary if the 
> code used more consistent types!), but that would take me a
> lot of time, plus, there should be a way to simply use the .dll: since 
> there IS a windows console app, there must be either a .lib
> file somewhere, or there is an alternative way of using DLL's from a 
> windows console app, that I'm not aware of. 

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

Reply via email to