diff options
author | drh <> | 2024-10-10 09:59:06 +0000 |
---|---|---|
committer | drh <> | 2024-10-10 09:59:06 +0000 |
commit | f553588c76ee1adbdc7b7c8ec340c687a2f881be (patch) | |
tree | 5e99e841556ea87434c1a420020bd71a49ea4b6a /doc | |
parent | 50ec92f7ce21b031ccc8df1e9637cd67124d57db (diff) | |
download | sqlite-f553588c76ee1adbdc7b7c8ec340c687a2f881be.tar.gz sqlite-f553588c76ee1adbdc7b7c8ec340c687a2f881be.zip |
Adjustments to the Makefile.msc to get static builds of sqlite3_analyzer.exe
working with TCL9. Update the compile-for-windows.md document for TCL9.
FossilOrigin-Name: df16d07d8db042cdb1dc6bb9a00a0265ba791a615d74f9152d0b3344e618fe93
Diffstat (limited to 'doc')
-rw-r--r-- | doc/compile-for-windows.md | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/doc/compile-for-windows.md b/doc/compile-for-windows.md index 1627188ac..18189f537 100644 --- a/doc/compile-for-windows.md +++ b/doc/compile-for-windows.md @@ -1,7 +1,7 @@ # Notes On Compiling SQLite On Windows 11 Here are step-by-step instructions on how to build SQLite from -canonical source on a new Windows 11 PC, as of 2023-11-01: +canonical source on a new Windows 11 PC, as of 2024-10-09: 1. Install Microsoft Visual Studio. The free "community edition" will work fine. Do a standard install for C++ development. @@ -20,9 +20,11 @@ canonical source on a new Windows 11 PC, as of 2023-11-01: install the TCL development libraries in the "`c:\Tcl`" directory. Make adjustments if you want TCL installed somewhere else. SQLite needs both the - "tclsh.exe" command-line tool as part of the build process, and - the "tcl86.lib" library in order to run tests. You will need - TCL version 8.6 or later. + "tclsh90.exe" command-line tool as part of the build process, and + the "tcl90.lib" and "tclstub.lib" libraries in order to run tests. + This document assumes you are working with <b>TCL version 9.0</b>. + See versions of this document from prior to 2024-10-10 for + instructions on how to build using TCL version 8.6. <ol type="a"> <li>Get the TCL source archive, perhaps from [https://www.tcl.tk/software/tcltk/download.html](https://www.tcl.tk/software/tcltk/download.html). @@ -30,13 +32,10 @@ canonical source on a new Windows 11 PC, as of 2023-11-01: of the source tree. <li>Run: `nmake /f makefile.vc release` <li>Run: `nmake /f makefile.vc INSTALLDIR=c:\Tcl install` - <li>CD to `c:\Tcl\lib`. In that subfolder make a copy of the - "`tcl86t.lib`" file to the alternative name "`tcl86.lib`" - (omitting the second 't'). Leave the copy in the same directory - as the original. - <li>CD to `c:\Tcl\bin`. Make a copy of the "`tclsh86t.exe`" - file into "`tclsh.exe`" (without the "86t") in the same directory. - <li>Add `c:\Tcl\bin` to your %PATH%. To do this, go to Settings + <li><i>Optional:</i> CD to `c:\Tcl\bin` and make a copy of + `tclsh90.exe` over into just `tclsh.exe`. + <li><i>Optional:</i> + Add `c:\Tcl\bin` to your %PATH%. To do this, go to Settings and search for "path". Select "edit environment variables for your account" and modify your default PATH accordingly. You will need to close and reopen your command prompts after @@ -59,6 +58,7 @@ canonical source on a new Windows 11 PC, as of 2023-11-01: <li> `nmake /f makefile.msc sqlite3.c` <li> `nmake /f makefile.msc sqlite3.exe` <li> `nmake /f makefile.msc sqldiff.exe` + <li> `nmake /f makefile.msc sqlite3-rsync.exe` <li> `nmake /f makefile.msc tclextension-install` <li> `nmake /f makefile.msc devtest` <li> `nmake /f makefile.msc releasetest` @@ -127,7 +127,7 @@ nmake /f Makefile.msc sqlite3_analyzer.exe ~~~~ And you will end up with a working executable. However, that executable -will depend on having the "tcl86.dll" library somewhere on your %PATH%. +will depend on having the "tcl98.dll" library somewhere on your %PATH%. Use the following steps to build an executable that has the TCL library statically linked so that it does not depend on separate DLL: @@ -137,13 +137,12 @@ statically linked so that it does not depend on separate DLL: 2. Untar the TCL source tarball into a fresh directory. CD into the "win/" subfolder. - 3. Run: `nmake /f makefile.vc OPTS=nothreads,static shell` - + 3. Run: `nmake /f makefile.vc OPTS=static shell` 4. CD into the "Release*" subfolder that is created (note the wildcard - the full name of the directory might vary). There - you will find the "tcl86s.lib" file. Copy this file into the - same directory that you put the "tcl86.lib" on your initial + you will find the "tcl90s.lib" file. Copy this file into the + same directory that you put the "tcl90.lib" on your initial installation. (In this document, that directory is "`C:\Tcl32\lib`" for 32-bit builds and "`C:\Tcl\lib`" for 64-bit builds.) @@ -152,12 +151,12 @@ statically linked so that it does not depend on separate DLL: utility program, but add the following extra arguments to the nmake command line: <blockquote><pre> - CCOPTS="-DSTATIC_BUILD" LIBTCL="tcl86s.lib netapi32.lib user32.lib" + CCOPTS="-DSTATIC_BUILD" LIBTCL="tcl90s.lib" </pre></blockquote> <p>So, for example, to build a statically linked version of sqlite3_analyzer.exe, you might type: <blockquote><pre> - nmake /f Makefile.msc CCOPTS="-DSTATIC_BUILD" LIBTCL="tcl86s.lib netapi32.lib user32.lib" sqlite3_analyzer.exe + nmake /f Makefile.msc CCOPTS="-DSTATIC_BUILD" LIBTCL="tcl90s.lib" sqlite3_analyzer.exe </pre></blockquote> 6. After your executable is built, you can verify that it does not |