Re: [sqlite] SQLite3 on Windows
On Sat, Oct 14, 2017 at 10:47 PM, Phoenix wrote: > Dominique wrote: > Not to sound too snarky, but both questions can easily be answered > through experimentation. > You can also use http://www.dependencywalker.com/ to inspect DLL and > EXE dependencies. --DD > > It's a bit difficult to do that if you don't have access to a Windows > box. I have been using Linux since Jan 2009 and I haven't touched > Windows since then. > OK. You didn't mention that before. I'm sure Linux has a way to look inside Windows PE binaries, e.g. [1] below perhaps, but whether one can get the dependencies easily, I don't know. Had you explained your lack of Windows access, i.e. context, you'd probably have gotten your answer quicker, FWIW. He had downloaded sqlite-dll-win32-x86-3200100.zip and after unzipping > it was trying to link it to his GnuCOBOL program and having problems. > One of the project developers was able to put him right. Glad it worked out in the end, via a different channel. --DD [1] https://ubuntuforums.org/showthread.php?t=1442258 ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite3 on Windows
Sorry I have not responded to the raised questions on this post but I have not received any Digests since the 8th (Volume 118 Issue 8). Dominique wrote: Not to sound too snarky, but both questions can easily be answered through experimentation. You can also use http://www.dependencywalker.com/ to inspect DLL and EXE dependencies. --DD It's a bit difficult to do that if you don't have access to a Windows box. I have been using Linux since Jan 2009 and I haven't touched Windows since then. I have written a library of user defined functions for the GnuCOBOL Project and somebody had some problems with setting up SQLite3 on their Windows box. I was just trying to get some info to help him. He had downloaded sqlite-dll-win32-x86-3200100.zip and after unzipping it was trying to link it to his GnuCOBOL program and having problems. One of the project developers was able to put him right. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite3 on Windows
err.. that should be Embarcadero 10.1 Berlin... ugh.. PROOFREAD!!! On Tue, Oct 10, 2017 at 4:20 PM, Stephen Chrzanowski wrote: > > Based purely on my experience with Delphi (From Borland Version 5 to > Emarcadero 10.5 Berlin); > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite3 on Windows
1> Standalone 2.a> If you're referring to the DLL from an application you're building, it must be either the Path, or, in the "Directory" your shortcut points to, which is either something custom, or, the EXEs current directory. Its already been mentioned where that DLL should be placed. 2.b> If you're referring to the DLL being needed for the sqlite3.exe app, its not needed at all. Based purely on my experience with Delphi (From Borland Version 5 to Emarcadero 10.5 Berlin); For point 2.a, there are three ways that I can think of to run the EXE. In any case, a valid place is to put the DLL in a directory specified in your %PATH% environment variable, unless you're concerned about DLL HELL and other applications with a custom Sqlite3.dll library decide to do some overwriting. The first method of running an EXE is via a shortcut. The order of operations that the EXE (should) look for the DLL is where the "Start In" path dictates, and if it doesn't exist there, then it'll check %PATH% The second method is directly running the EXE through the file browser. The order of operations for that mode of running the EXE is the directory you're running the EXE from is scanned, then your %PATH% The third method is via a command line window, as an example, where you're sitting in c:\Dir1 but you run the EXE as [c:\Dir2\Some.exe]. That order of operation would be to look for the DLL in c:\Dir1 then %PATH%. Y.M.M.V. depending on the build and compile options to where the library files are loaded from. I'm not aware of any documentation that specifies where applications are to, or should, look for DLL files, but, I'm sure I'll be smacked with that when someone in the know wants to correct me. :] For anything I distribute, I include the DLL in the installation package and have it put in the install directory, but, I don't rely on the DLL in my applications directory, but, rather somewhere in the %PATH%. The reason for putting the DLL in the EXE directory is two-fold: - I'm not 100% sure, but either my build environment makes the EXE check the local directory for the SQLite3.dll file first, then checks path. - What I'm compiling is guaranteed to work vs what else might be on the system. On Tuesday, October 10, 2017, Phoenix wrote: > I've downloaded the dll-win32 version of SQLite3 and have a couple of > questions. > > 1) Does sqlite3.exe require the .dll file or is it stand-alone? > > 2) Does the .dll need to be in a specific folder or is it okay if the > folder is listed in my PATH? > ___ > 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] SQLite3 on Windows
Perhaps I misunderestimate your question, but I think a certain amount of explanation of how SQLite works may be in order. What are you trying to do? The SQLite shell tool does not depend on the DLL (the SQLite library is instead included in the executable file). You can put sqlite3.exe wherever you like and do not need to copy anything else around with it. Probably in a PATH folder is best, so you can access it whenever necessary; but I have also included it in project folders that I have worked on so I can check it straight into source control to make it easier for other developers to use (with a certain amount of cringing about what I was doing). SQLite is not like other database management systems (MSSQL, MySql, Postgre, etc.) in that it does not have a dedicated server that runs to control DB access. Instead, every application that wants to use SQLite directly accesses the relevant files, using the SQLite library. The library can be though of as a component of the particular app that wishes to access SQLite databases. As a result, as a user you should not need to put the dll anywhere. Any program that relies on SQLite should include it with its distribution, either as a DLL which will be installed into that programs install directly, or compiled directly into the executable of the program. You should only need the SQLite dll if you intend to build applications (using an unmanaged language, such as C or C++) that use SQLite*. In that case, it will likely reside with other third party libraries your project references, and you should ensure that any installer you distribute includes that file. *Sometimes it's better to use the dll file to build applications, sometimes it's better to just download a copy of the amalgamation c source files and include that in your project. On 10 October 2017 at 08:38, Keith Medcalf wrote: > > Hmmm. > > Must be rather old since it mentions 16-bit Windows but not 64-bit > Windows. So for all the parts that reference the "System" directories you > need to apply a grain of salt > > 64-bit Windows looks for 64-bit DLLs in Windows\System32 > 64-bit Windows looks for 32-bit DLLs in Windows\SysWOW64 (and not in > Windows\System32) > 32-bit Windows looks for 32-bit DLLs in Windows\System32 > 32-bit Windows looks for 16-bit DLLs in Windows\System > > The "Common Files" search location is automagically, on 64-bit Windows, > Program Files (x86)\Common Files when looking for at 32-bit DLL and > Program Files\Common Files when looking for 64-bit DLL > > Similarly the names for 32-bit versions of Windows searching for 32-bit > DLLs is > Program Files\Common Files > > Also, searches that search the "Program Files" tree will automatically use > "Program Files (x86)" tree if looking for 32-bit DLLs on 64-bit Windows > Other search locations in the AppData tree also magically redirect to the > (x86) directories if looking for 32-bit DLLs on 64-bit Windows > > Paths are not modified so you better hope that if you put the DLL in a > directory in the (various) paths that it will attempt to load ONLY THE > FIRST such DLL found and will crash (or the loader will fail) if the DLL > first found is the wrong "bitedness". There are sekret registry hacks that > you can do to register the "same" module in different locations for > 16/32/64 loading automagically (more or less) but those hacks are not > officially supported. > > So, if you are using multiple versions of the same module named DLL, you > have to be careful where you put it, unless you know that you will only > ever require one model, or the application itself loads the DLL from the > Application Directory. Otherwise, if you need multiple models > simultaneously you need to be careful where you put them of use the default > System directories. > > --- > 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 Warren Young > >Sent: Tuesday, 10 October, 2017 08:57 > >To: SQLite mailing list > >Subject: Re: [sqlite] SQLite3 on Windows > > > >On Oct 10, 2017, at 3:49 AM, Phoenix > >wrote: > >> > >> 2) Does the .dll need to be in a specific folder or is it okay if > >the > >> folder is listed in my PATH? > > > >https://msdn.microsoft.com/en- > >us/library/windows/desktop/ms682586(v=vs.85).aspx > > > >___ > >sqlite-users mailing list > >sqlite-users@mailinglists.sqlite.org > >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > >
Re: [sqlite] SQLite3 on Windows
Hmmm. Must be rather old since it mentions 16-bit Windows but not 64-bit Windows. So for all the parts that reference the "System" directories you need to apply a grain of salt 64-bit Windows looks for 64-bit DLLs in Windows\System32 64-bit Windows looks for 32-bit DLLs in Windows\SysWOW64 (and not in Windows\System32) 32-bit Windows looks for 32-bit DLLs in Windows\System32 32-bit Windows looks for 16-bit DLLs in Windows\System The "Common Files" search location is automagically, on 64-bit Windows, Program Files (x86)\Common Files when looking for at 32-bit DLL and Program Files\Common Files when looking for 64-bit DLL Similarly the names for 32-bit versions of Windows searching for 32-bit DLLs is Program Files\Common Files Also, searches that search the "Program Files" tree will automatically use "Program Files (x86)" tree if looking for 32-bit DLLs on 64-bit Windows Other search locations in the AppData tree also magically redirect to the (x86) directories if looking for 32-bit DLLs on 64-bit Windows Paths are not modified so you better hope that if you put the DLL in a directory in the (various) paths that it will attempt to load ONLY THE FIRST such DLL found and will crash (or the loader will fail) if the DLL first found is the wrong "bitedness". There are sekret registry hacks that you can do to register the "same" module in different locations for 16/32/64 loading automagically (more or less) but those hacks are not officially supported. So, if you are using multiple versions of the same module named DLL, you have to be careful where you put it, unless you know that you will only ever require one model, or the application itself loads the DLL from the Application Directory. Otherwise, if you need multiple models simultaneously you need to be careful where you put them of use the default System directories. --- 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 Warren Young >Sent: Tuesday, 10 October, 2017 08:57 >To: SQLite mailing list >Subject: Re: [sqlite] SQLite3 on Windows > >On Oct 10, 2017, at 3:49 AM, Phoenix >wrote: >> >> 2) Does the .dll need to be in a specific folder or is it okay if >the >> folder is listed in my PATH? > >https://msdn.microsoft.com/en- >us/library/windows/desktop/ms682586(v=vs.85).aspx > >___ >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] SQLite3 on Windows
On Oct 10, 2017, at 3:49 AM, Phoenix wrote: > > 2) Does the .dll need to be in a specific folder or is it okay if the > folder is listed in my PATH? https://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite3 on Windows
On Tue, Oct 10, 2017 at 11:49 AM, Phoenix wrote: > I've downloaded the dll-win32 version of SQLite3 and have a couple of > questions. > > 1) Does sqlite3.exe require the .dll file or is it stand-alone? > > 2) Does the .dll need to be in a specific folder or is it okay if the > folder is listed in my PATH? > Not to sound too snarky, but both questions can easily be answered through experimentation. You can also use http://www.dependencywalker.com/ to inspect DLL and EXE dependencies. --DD ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite3 on Windows
I've downloaded the dll-win32 version of SQLite3 and have a couple of questions. 1) Does sqlite3.exe require the .dll file or is it stand-alone? 2) Does the .dll need to be in a specific folder or is it okay if the folder is listed in my PATH? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3 on Windows
On 1/26/2012 1:49 PM, Pete wrote: I have been using sqlite on OS X for some time and sqlite3 comes pre-installed. I'm now looking at running some apps on Windows 7 and I don't think sqlite3 is pre-installed on that platform. I see there is a precompiled binary available of sqlite3 available for download - what directory should this be installed in? If you haven't already guessed from the question, I'm not vey familiar with WIndows! http://sqlite.org/download.html There are several ways to do it. You can get amalgamation - the whole of SQLite in a single source file. Then just add it to your project and compile it together with the rest of your code. Or, from the same page, you could get precompiled DLL (look for sqlite-dll-win32-x86). You get a DLL and a DEF file. Follow instructions at http://msdn.microsoft.com/en-us/library/0b9xe492.aspx to build an import library, a LIB file (I assume you are using Visual Studio; instructions for other toolchains may differ). Then have your project link with that LIB. During deployment, install the DLL (not the LIB) in the same directory where you drop your executable. -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3 on Windows
On 26 Jan 2012, at 6:49pm, Pete wrote: > I have been using sqlite on OS X for some time and sqlite3 comes > pre-installed. I'm now looking at running some apps on Windows 7 and I > don't think sqlite3 is pre-installed on that platform. I see there is a > precompiled binary available of sqlite3 available for download - what > directory should this be installed in? If you haven't already guessed from > the question, I'm not vey familiar with WIndows! The precompiled application called sqlite3.exe on Windows, and sqlite3 on the Mac, is a stand-alone application that has no part to play when you are running other apps. It's a command-line program that lets you type SQLite commands and, just like every other application that uses SQLite3, has its own copy of the SQLite functions. Each application has its own copy of the SQLite3 functions. Normally they're built into the application itself and require no extra installation. If they come as a separate file that needs your attention the app itself should have instructions. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] sqlite3 on Windows
I have been using sqlite on OS X for some time and sqlite3 comes pre-installed. I'm now looking at running some apps on Windows 7 and I don't think sqlite3 is pre-installed on that platform. I see there is a precompiled binary available of sqlite3 available for download - what directory should this be installed in? If you haven't already guessed from the question, I'm not vey familiar with WIndows! -- Pete ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users