使用小型数据库SQLite3就要http://www.sqlite.org/download.html下载他的源码。
直接下载官方编译好的dll文件。
这个时候发现压缩包里只有dll和def文件。
那么就用以下方式生成lib文件吧:
1、在命令行执行:
dumpbin /exports sqlite3.dll > sqlite3.def
2、编辑 sqlite3.def 文件,使之格式与.def文件格式一致。比如:
将前面的编号去掉。
3、在命令行执行:
lib /def:sqlite3.def /machine:i386 /out:sqlite3.lib
直接下载官方编译好的dll文件。
sqlitedll-3_5_1.zip (182.95 KiB) | This is a DLL of the SQLite library without the TCL bindings. The only external dependency is MSVCRT.DLL. |
那么就用以下方式生成lib文件吧:
1、在命令行执行:
dumpbin /exports sqlite3.dll > sqlite3.def
Microsoft (R) COFF
/
PE Dumper Version
7.10
.
3077
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file sqlite3.dll
File Type: DLL
Section contains the following exports for sqlite3.dll
00000000 characteristics
47042120 time date stamp Thu Oct 04 07 : 09 : 20 2007
0.00 version
1 ordinal base
149 number of functions
149 number of names
ordinal hint RVA name
1 0 000186E8 sqlite3_aggregate_context
2 1 0001884C sqlite3_aggregate_count
3 2 0002F550 sqlite3_apis
4 3 0002FB20 sqlite3_auto_extension
5 4 00018DFC sqlite3_bind_blob
6 5 00018E20 sqlite3_bind_double
7 6 00018E88 sqlite3_bind_int
8 7 00018EA4 sqlite3_bind_int64
9 8 00018F14 sqlite3_bind_null
10 9 00019060 sqlite3_bind_parameter_count
11 A 00019118 sqlite3_bind_parameter_index
12 B 000190E0 sqlite3_bind_parameter_name
13 C 00018F54 sqlite3_bind_text
14 D 00018F78 sqlite3_bind_text16
15 E 00018F9C sqlite3_bind_value
16 F 00019000 sqlite3_bind_zeroblob
17 10 0001F380 sqlite3_blob_bytes
18 11 0001F244 sqlite3_blob_close
19 12 0001EC9C sqlite3_blob_open
20 13 0001F338 sqlite3_blob_read
21 14 0001F35C sqlite3_blob_write
22 15 000458D4 sqlite3_busy_handler
23 16 000459AC sqlite3_busy_timeout
24 17 00044EB0 sqlite3_changes
25 18 00017FC4 sqlite3_clear_bindings
26 19 00044F00 sqlite3_close
27 1A 000468E0 sqlite3_collation_needed
28 1B 0004693C sqlite3_collation_needed16
29 1C 00018984 sqlite3_column_blob
30 1D 000189BC sqlite3_column_bytes
31 1E 000189F4 sqlite3_column_bytes16
32 1F 0001885C sqlite3_column_count
33 20 00018C74 sqlite3_column_decltype
34 21 00018C90 sqlite3_column_decltype16
35 22 00018A2C sqlite3_column_double
36 23 00018A64 sqlite3_column_int
37 24 00018A9C sqlite3_column_int64
38 25 00018C3C sqlite3_column_name
39 26 00018C58 sqlite3_column_name16
40 27 00018ADC sqlite3_column_text
41 28 00018B40 sqlite3_column_text16
42 29 00018B78 sqlite3_column_type
43 2A 00018B14 sqlite3_column_value
44 2B 00045E44 sqlite3_commit_hook
45 2C 0004492C sqlite3_complete
46 2D 00044DA0 sqlite3_complete16
47 2E 000467B4 sqlite3_create_collation
48 2F 00046868 sqlite3_create_collation16
49 30 0004680C sqlite3_create_collation_v2
50 31 00045C58 sqlite3_create_function
51 32 00045CC0 sqlite3_create_function16
52 33 0003AC44 sqlite3_create_module
53 34 0003AC64 sqlite3_create_module_v2
54 35 00018870 sqlite3_data_count
55 36 0001923C sqlite3_db_handle
56 37 0003B710 sqlite3_declare_vtab
57 38 0002FAE0 sqlite3_enable_load_extension
58 39 0000C7A8 sqlite3_enable_shared_cache
59 3A 0004613C sqlite3_errcode
60 3B 00045F90 sqlite3_errmsg
61 3C 00046084 sqlite3_errmsg16
62 3D 0002F25C sqlite3_exec
63 3E 00017F08 sqlite3_expired
64 3F 00046A00 sqlite3_extended_result_codes
65 40 00046A48 sqlite3_file_control
66 41 00017F24 sqlite3_finalize
67 42 000037BC sqlite3_free
68 43 00037F48 sqlite3_free_table
69 44 000469A0 sqlite3_get_autocommit
70 45 00018750 sqlite3_get_auxdata
71 46 00037D78 sqlite3_get_table
72 47 00046998 sqlite3_global_recover
73 48 00045A08 sqlite3_interrupt
74 49 00044EA0 sqlite3_last_insert_rowid
75 4A 00044E14 sqlite3_libversion
76 4B 00044E20 sqlite3_libversion_number
77 4C 0002FA5C sqlite3_load_extension
78 4D 000036D0 sqlite3_malloc
79 4E 0000360C sqlite3_memory_alarm
80 4F 000035B8 sqlite3_memory_highwater
81 50 00003584 sqlite3_memory_used
82 51 00005518 sqlite3_mprintf
83 52 000039A8 sqlite3_mutex_alloc
84 53 00003A88 sqlite3_mutex_enter
85 54 00003A68 sqlite3_mutex_free
86 55 00003B08 sqlite3_mutex_held
87 56 00003AF0 sqlite3_mutex_leave
88 57 00003B34 sqlite3_mutex_notheld
89 58 00003AB0 sqlite3_mutex_try
90 59 000466A8 sqlite3_open
91 5A 000466F4 sqlite3_open16
92 5B 000466C0 sqlite3_open_v2
93 5C 00045D3C sqlite3_overload_function
94 5D 00032D18 sqlite3_prepare
95 5E 00032E30 sqlite3_prepare16
96 5F 00032E54 sqlite3_prepare16_v2
97 60 00032D3C sqlite3_prepare_v2
98 61 00045E08 sqlite3_profile
99 62 00045930 sqlite3_progress_handler
100 63 00003810 sqlite3_realloc
101 64 00003BCC sqlite3_release_memory
102 65 00017F68 sqlite3_reset
103 66 0002FBBC sqlite3_reset_auto_extension
104 67 0001813C sqlite3_result_blob
105 68 00018160 sqlite3_result_double
106 69 00018180 sqlite3_result_error
107 6A 000181A8 sqlite3_result_error16
108 6B 0001830C sqlite3_result_error_nomem
109 6C 000182F0 sqlite3_result_error_toobig
110 6D 000181D0 sqlite3_result_int
111 6E 000181F0 sqlite3_result_int64
112 6F 00018210 sqlite3_result_null
113 70 00018228 sqlite3_result_text
114 71 0001824C sqlite3_result_text16
115 72 00018270 sqlite3_result_text16be
116 73 00018294 sqlite3_result_text16le
117 74 000182B8 sqlite3_result_value
118 75 000182D4 sqlite3_result_zeroblob
119 76 00045EC4 sqlite3_rollback_hook
120 77 000251F4 sqlite3_set_authorizer
121 78 00018778 sqlite3_set_auxdata
122 79 000469B4 sqlite3_sleep
123 7A 00005530 sqlite3_snprintf
124 7B 00003B74 sqlite3_soft_heap_limit
125 7C 000185E0 sqlite3_step
126 7D 000469AC sqlite3_thread_cleanup
127 7E 00044E2C sqlite3_threadsafe
128 7F 00044EBC sqlite3_total_changes
129 80 00045DCC sqlite3_trace
130 81 0001917C sqlite3_transfer_bindings
131 82 00045E80 sqlite3_update_hook
132 83 00018658 sqlite3_user_data
133 84 00018028 sqlite3_value_blob
134 85 00018064 sqlite3_value_bytes
135 86 0001807C sqlite3_value_bytes16
136 87 00018094 sqlite3_value_double
137 88 000180A8 sqlite3_value_int
138 89 000180BC sqlite3_value_int64
139 8A 0001940C sqlite3_value_numeric_type
140 8B 000180D0 sqlite3_value_text
141 8C 000180E8 sqlite3_value_text16
142 8D 00018100 sqlite3_value_text16be
143 8E 00018118 sqlite3_value_text16le
144 8F 00018130 sqlite3_value_type
145 90 00044E0C sqlite3_version
146 91 000033D0 sqlite3_vfs_find
147 92 00003498 sqlite3_vfs_register
148 93 00003510 sqlite3_vfs_unregister
149 94 000054EC sqlite3_vmprintf
Summary
1000 .bss
1000 .data
2000 .edata
1000 .idata
2000 .reloc
2000 .stab
2000 .stabstr
47000 .text
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file sqlite3.dll
File Type: DLL
Section contains the following exports for sqlite3.dll
00000000 characteristics
47042120 time date stamp Thu Oct 04 07 : 09 : 20 2007
0.00 version
1 ordinal base
149 number of functions
149 number of names
ordinal hint RVA name
1 0 000186E8 sqlite3_aggregate_context
2 1 0001884C sqlite3_aggregate_count
3 2 0002F550 sqlite3_apis
4 3 0002FB20 sqlite3_auto_extension
5 4 00018DFC sqlite3_bind_blob
6 5 00018E20 sqlite3_bind_double
7 6 00018E88 sqlite3_bind_int
8 7 00018EA4 sqlite3_bind_int64
9 8 00018F14 sqlite3_bind_null
10 9 00019060 sqlite3_bind_parameter_count
11 A 00019118 sqlite3_bind_parameter_index
12 B 000190E0 sqlite3_bind_parameter_name
13 C 00018F54 sqlite3_bind_text
14 D 00018F78 sqlite3_bind_text16
15 E 00018F9C sqlite3_bind_value
16 F 00019000 sqlite3_bind_zeroblob
17 10 0001F380 sqlite3_blob_bytes
18 11 0001F244 sqlite3_blob_close
19 12 0001EC9C sqlite3_blob_open
20 13 0001F338 sqlite3_blob_read
21 14 0001F35C sqlite3_blob_write
22 15 000458D4 sqlite3_busy_handler
23 16 000459AC sqlite3_busy_timeout
24 17 00044EB0 sqlite3_changes
25 18 00017FC4 sqlite3_clear_bindings
26 19 00044F00 sqlite3_close
27 1A 000468E0 sqlite3_collation_needed
28 1B 0004693C sqlite3_collation_needed16
29 1C 00018984 sqlite3_column_blob
30 1D 000189BC sqlite3_column_bytes
31 1E 000189F4 sqlite3_column_bytes16
32 1F 0001885C sqlite3_column_count
33 20 00018C74 sqlite3_column_decltype
34 21 00018C90 sqlite3_column_decltype16
35 22 00018A2C sqlite3_column_double
36 23 00018A64 sqlite3_column_int
37 24 00018A9C sqlite3_column_int64
38 25 00018C3C sqlite3_column_name
39 26 00018C58 sqlite3_column_name16
40 27 00018ADC sqlite3_column_text
41 28 00018B40 sqlite3_column_text16
42 29 00018B78 sqlite3_column_type
43 2A 00018B14 sqlite3_column_value
44 2B 00045E44 sqlite3_commit_hook
45 2C 0004492C sqlite3_complete
46 2D 00044DA0 sqlite3_complete16
47 2E 000467B4 sqlite3_create_collation
48 2F 00046868 sqlite3_create_collation16
49 30 0004680C sqlite3_create_collation_v2
50 31 00045C58 sqlite3_create_function
51 32 00045CC0 sqlite3_create_function16
52 33 0003AC44 sqlite3_create_module
53 34 0003AC64 sqlite3_create_module_v2
54 35 00018870 sqlite3_data_count
55 36 0001923C sqlite3_db_handle
56 37 0003B710 sqlite3_declare_vtab
57 38 0002FAE0 sqlite3_enable_load_extension
58 39 0000C7A8 sqlite3_enable_shared_cache
59 3A 0004613C sqlite3_errcode
60 3B 00045F90 sqlite3_errmsg
61 3C 00046084 sqlite3_errmsg16
62 3D 0002F25C sqlite3_exec
63 3E 00017F08 sqlite3_expired
64 3F 00046A00 sqlite3_extended_result_codes
65 40 00046A48 sqlite3_file_control
66 41 00017F24 sqlite3_finalize
67 42 000037BC sqlite3_free
68 43 00037F48 sqlite3_free_table
69 44 000469A0 sqlite3_get_autocommit
70 45 00018750 sqlite3_get_auxdata
71 46 00037D78 sqlite3_get_table
72 47 00046998 sqlite3_global_recover
73 48 00045A08 sqlite3_interrupt
74 49 00044EA0 sqlite3_last_insert_rowid
75 4A 00044E14 sqlite3_libversion
76 4B 00044E20 sqlite3_libversion_number
77 4C 0002FA5C sqlite3_load_extension
78 4D 000036D0 sqlite3_malloc
79 4E 0000360C sqlite3_memory_alarm
80 4F 000035B8 sqlite3_memory_highwater
81 50 00003584 sqlite3_memory_used
82 51 00005518 sqlite3_mprintf
83 52 000039A8 sqlite3_mutex_alloc
84 53 00003A88 sqlite3_mutex_enter
85 54 00003A68 sqlite3_mutex_free
86 55 00003B08 sqlite3_mutex_held
87 56 00003AF0 sqlite3_mutex_leave
88 57 00003B34 sqlite3_mutex_notheld
89 58 00003AB0 sqlite3_mutex_try
90 59 000466A8 sqlite3_open
91 5A 000466F4 sqlite3_open16
92 5B 000466C0 sqlite3_open_v2
93 5C 00045D3C sqlite3_overload_function
94 5D 00032D18 sqlite3_prepare
95 5E 00032E30 sqlite3_prepare16
96 5F 00032E54 sqlite3_prepare16_v2
97 60 00032D3C sqlite3_prepare_v2
98 61 00045E08 sqlite3_profile
99 62 00045930 sqlite3_progress_handler
100 63 00003810 sqlite3_realloc
101 64 00003BCC sqlite3_release_memory
102 65 00017F68 sqlite3_reset
103 66 0002FBBC sqlite3_reset_auto_extension
104 67 0001813C sqlite3_result_blob
105 68 00018160 sqlite3_result_double
106 69 00018180 sqlite3_result_error
107 6A 000181A8 sqlite3_result_error16
108 6B 0001830C sqlite3_result_error_nomem
109 6C 000182F0 sqlite3_result_error_toobig
110 6D 000181D0 sqlite3_result_int
111 6E 000181F0 sqlite3_result_int64
112 6F 00018210 sqlite3_result_null
113 70 00018228 sqlite3_result_text
114 71 0001824C sqlite3_result_text16
115 72 00018270 sqlite3_result_text16be
116 73 00018294 sqlite3_result_text16le
117 74 000182B8 sqlite3_result_value
118 75 000182D4 sqlite3_result_zeroblob
119 76 00045EC4 sqlite3_rollback_hook
120 77 000251F4 sqlite3_set_authorizer
121 78 00018778 sqlite3_set_auxdata
122 79 000469B4 sqlite3_sleep
123 7A 00005530 sqlite3_snprintf
124 7B 00003B74 sqlite3_soft_heap_limit
125 7C 000185E0 sqlite3_step
126 7D 000469AC sqlite3_thread_cleanup
127 7E 00044E2C sqlite3_threadsafe
128 7F 00044EBC sqlite3_total_changes
129 80 00045DCC sqlite3_trace
130 81 0001917C sqlite3_transfer_bindings
131 82 00045E80 sqlite3_update_hook
132 83 00018658 sqlite3_user_data
133 84 00018028 sqlite3_value_blob
134 85 00018064 sqlite3_value_bytes
135 86 0001807C sqlite3_value_bytes16
136 87 00018094 sqlite3_value_double
137 88 000180A8 sqlite3_value_int
138 89 000180BC sqlite3_value_int64
139 8A 0001940C sqlite3_value_numeric_type
140 8B 000180D0 sqlite3_value_text
141 8C 000180E8 sqlite3_value_text16
142 8D 00018100 sqlite3_value_text16be
143 8E 00018118 sqlite3_value_text16le
144 8F 00018130 sqlite3_value_type
145 90 00044E0C sqlite3_version
146 91 000033D0 sqlite3_vfs_find
147 92 00003498 sqlite3_vfs_register
148 93 00003510 sqlite3_vfs_unregister
149 94 000054EC sqlite3_vmprintf
Summary
1000 .bss
1000 .data
2000 .edata
1000 .idata
2000 .reloc
2000 .stab
2000 .stabstr
47000 .text
2、编辑 sqlite3.def 文件,使之格式与.def文件格式一致。比如:
将前面的编号去掉。
3、在命令行执行:
lib /def:sqlite3.def /machine:i386 /out:sqlite3.lib