Hello,
First of all I'd like to point out that wxWidgets and wxCode totally rock!
Being able to write portable code is just fantastic!
I'm stuck. Looked around and tried out different stuff for days now.
I've been looking all over the forum and can't find a solution to this problem.
How to compile wxSQLite3 lib and the application that relys on wxSQLite3 so it doesn't require the sqlite3.dll at run-time??
The goal is to include all of wxSQLite3 and sqlite3 in my application binary.
Setting USE_DYNAMIC_SQLITE3_LOAD=0 in the makefile.gcc does nothing for me!
The application still demands the sqlite.dll at startup.
I'm using mingw(gcc), wxWidgets-2.6.2 (wxMSW) and wxSQLite3-1.5.
Every hint is highly appreciated.
Greetings
Lorijho
using wxSQLite3 in an application w/out loading sqlite3.dll Topic is solved
Re: using wxSQLite3 in an application w/out loading sqlite3.
This is of course possible - I do it myself in a project where I use a slightly modified sqlite3 library. The solution is to build a static sqlite3 library. No modifications to wxSQLite3 are required.lorijho wrote:How to compile wxSQLite3 lib and the application that relys on wxSQLite3 so it doesn't require the sqlite3.dll at run-time??
The goal is to include all of wxSQLite3 and sqlite3 in my application binary.
You have to download the complete source code for sqlite from http://www.sqlite.org/download.html. Look for the ZIP archive since it already includes all generated sources and is ready to compile on Windows without the need for additional tools. Unfortunately no makefile is included. That is, you have to create a makefile or project file yourself. You have to build a static library from all C source files except shell.c (which is the stand alone tool for sqlite3) and tclsqlite.c (which is the tcl wrapper).
This switch only eliminates the need for the link library sqlite3.lib, which implicitly loads sqlite3.dll and of which wxSQLite3 contains a MS VC++ 6 version only (which might not work for other compilers), instead the sqlite3.dll is explicitly loaded at runtime.lorijho wrote:Setting USE_DYNAMIC_SQLITE3_LOAD=0 in the makefile.gcc does nothing for me!
The application still demands the sqlite.dll at startup.
Replace the file sqlite3.lib in the wxSQLite3 distribution by the sqlite3.lib created as stated above and compile wxSQLite3 as a static library. Don't forget to set USE_DYNAMIC_SQLITE3_LOAD=0.
Regards,
Ulrich