Re: [sqlite] [C++] Import sqlite3.dll and/or sqlite database as resource in project?

2008-08-24 Thread CAVALO SCHMIDT
salutations,

I don't understand exactly what you
mean by "library project". is it a
"Win32 Static Library"?
do I create the library project and
include "sqlite3.c" in it?
in this way, will sqlite be integrated
in the application, instead of located
in an external DLL file?
note: I'm using Visual C++ 6.0.

thank you in advance.

2008/8/24 Teg <[EMAIL PROTECTED]>:
> Hello CAVALO,
>
> Sunday, August 24, 2008, 12:12:05 PM, you wrote:
>
> CS> salutations,
>
> CS> so, I should just import the sqlite3.c file into
> CS> the project, not linking to sqlite3.lib?
> CS> is it necessary to #include this file in main.cpp,
> CS> or do we only need to import it in the project?
> CS> what about sqlite3.h?
> CS> is just "sqlite3.c" necessary for this?
>
> CS> thank you in advance.
>
>
> I created a library project, then in the dependencies, told the
> environment that my program depended on this library and when I build, it
> automatically includes this library into my program.
>
> Project/Project Dependencies is the menu.
>
> When I rebuild my app, SQLite gets built with it. When I debug, I can
> single step into SQLite if I need to.
>
> --
> Best regards,
>  Tegmailto:[EMAIL PROTECTED]
>
> ___
> 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] [C++] Import sqlite3.dll and/or sqlite database as resource in project?

2008-08-24 Thread Teg
Hello CAVALO,

Sunday, August 24, 2008, 12:12:05 PM, you wrote:

CS> salutations,

CS> so, I should just import the sqlite3.c file into
CS> the project, not linking to sqlite3.lib?
CS> is it necessary to #include this file in main.cpp,
CS> or do we only need to import it in the project?
CS> what about sqlite3.h?
CS> is just "sqlite3.c" necessary for this?

CS> thank you in advance.


I created a library project, then in the dependencies, told the
environment that my program depended on this library and when I build, it
automatically includes this library into my program.

Project/Project Dependencies is the menu.

When I rebuild my app, SQLite gets built with it. When I debug, I can
single step into SQLite if I need to.

-- 
Best regards,
 Tegmailto:[EMAIL PROTECTED]

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


Re: [sqlite] [C++] Import sqlite3.dll and/or sqlite database as resource in project?

2008-08-24 Thread CAVALO SCHMIDT
salutations,

so, I should just import the sqlite3.c file into
the project, not linking to sqlite3.lib?
is it necessary to #include this file in main.cpp,
or do we only need to import it in the project?
what about sqlite3.h?
is just "sqlite3.c" necessary for this?

thank you in advance.

2008/8/10 D. Richard Hipp <[EMAIL PROTECTED]>:
>
> On Aug 10, 2008, at 2:12 PM, CAVALO SCHMIDT wrote:
>
>> salutations, using VC++ in WinXP.
>>
>> I would like to know if it's possible to import and use the
>> sqlite3.dll file and/or the sqlite database file as a resource in a
>> C++ project, so that it will be integrated to the final Win32
>> executable. how would it be possible to use sqlite3_open with a
>> database file stored as a resource in the application?
>
>
> If you want a stand-alone executable, do not use sqlite3.dll.
> Instead, use the source code file "sqlite3.c" and compile it into your
> application.
>
> If you have the content of an SQLite database file stored as a
> constant array of bytes in your program, you could have sqlite3 open
> this constant array as if it were a read-only database file by writing
> and registering your own custom VFS layer that reads from the constant
> byte array rather than a file.  You do not have to modify any of the
> core SQLite code to do this, but you do need to write your own VFS
> module, which will require that you have a deep understanding of how
> the SQLite core operates.
>
>
> D. Richard Hipp
> [EMAIL PROTECTED]
>
>
>
> ___
> 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] [C++] Import sqlite3.dll and/or sqlite database as resource in project?

2008-08-10 Thread Doug Currie

On Aug 10, 2008, at 2:12 PM, CAVALO SCHMIDT wrote:

> salutations, using VC++ in WinXP.
>
> I would like to know if it's possible to import and use the
> sqlite3.dll file and/or the sqlite database file as a resource in a
> C++ project, so that it will be integrated to the final Win32
> executable. how would it be possible to use sqlite3_open with a
> database file stored as a resource in the application?

I have no quibble with the other replies to your message; another  
option is EEE

http://www.erikveen.dds.nl/eee/

-- e

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


Re: [sqlite] [C++] Import sqlite3.dll and/or sqlite database as resource in project?

2008-08-10 Thread D. Richard Hipp

On Aug 10, 2008, at 2:12 PM, CAVALO SCHMIDT wrote:

> salutations, using VC++ in WinXP.
>
> I would like to know if it's possible to import and use the
> sqlite3.dll file and/or the sqlite database file as a resource in a
> C++ project, so that it will be integrated to the final Win32
> executable. how would it be possible to use sqlite3_open with a
> database file stored as a resource in the application?


If you want a stand-alone executable, do not use sqlite3.dll.   
Instead, use the source code file "sqlite3.c" and compile it into your  
application.

If you have the content of an SQLite database file stored as a  
constant array of bytes in your program, you could have sqlite3 open  
this constant array as if it were a read-only database file by writing  
and registering your own custom VFS layer that reads from the constant  
byte array rather than a file.  You do not have to modify any of the  
core SQLite code to do this, but you do need to write your own VFS  
module, which will require that you have a deep understanding of how  
the SQLite core operates.


D. Richard Hipp
[EMAIL PROTECTED]



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