aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/www/dynload.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/www/dynload.tcl')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/www/dynload.tcl70
1 files changed, 70 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/www/dynload.tcl b/libraries/sqlite/unix/sqlite-3.5.1/www/dynload.tcl
new file mode 100644
index 0000000..3e12b7f
--- /dev/null
+++ b/libraries/sqlite/unix/sqlite-3.5.1/www/dynload.tcl
@@ -0,0 +1,70 @@
1#
2# Run this Tcl script to generate the dynload.html file.
3#
4set rcsid {$Id: dynload.tcl,v 1.1 2001/02/11 16:58:22 drh Exp $}
5
6puts {<html>
7<head>
8 <title>How to build a dynamically loaded Tcl extension for SQLite</title>
9</head>
10<body bgcolor=white>
11<h1 align=center>
12How To Build A Dynamically Loaded Tcl Extension
13</h1>}
14puts {<p>
15<i>This note was contributed by
16<a href="bsaunder@tampabay.rr.com.nospam">Bill Saunders</a>. Thanks, Bill!</i>
17
18<p>
19To compile the SQLite Tcl extension into a dynamically loaded module
20I did the following:
21</p>
22
23<ol>
24<li><p>Do a standard compile
25(I had a dir called bld at the same level as sqlite ie
26 /root/bld
27 /root/sqlite
28I followed the directions and did a standard build in the bld
29directory)</p></li>
30
31<li><p>
32Now do the following in the bld directory
33<blockquote><pre>
34gcc -shared -I. -lgdbm ../sqlite/src/tclsqlite.c libsqlite.a -o sqlite.so
35</pre></blockquote></p></li>
36
37<li><p>
38This should produce the file sqlite.so in the bld directory</p></li>
39
40<li><p>
41Create a pkgIndex.tcl file that contains this line
42
43<blockquote><pre>
44package ifneeded sqlite 1.0 [list load [file join $dir sqlite.so]]
45</pre></blockquote></p></li>
46
47<li><p>
48To use this put sqlite.so and pkgIndex.tcl in the same directory</p></li>
49
50<li><p>
51From that directory start wish</p></li>
52
53<li><p>
54Execute the following tcl command (tells tcl where to fine loadable
55modules)
56<blockquote><pre>
57lappend auto_path [exec pwd]
58</pre></blockquote></p></li>
59
60<li><p>
61Load the package
62<blockquote><pre>
63package require sqlite
64</pre></blockquote></p></li>
65
66<li><p>
67Have fun....</p></li>
68</ul>
69
70</body></html>}