使用小型数据库SQLite3就要http://www.sqlite.org/download.html下载他的源码.
直接下载官方编译好的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.
这个时候发现压缩包里只有dll和def文件.
那么就用以下方式生成lib文件吧:
dumpbin.exe和lib.exe均在C:\Program Files\Microsoft Visual Studio\VC98\Bin\LIB.EXE(即安装目录的VC98\Bin)下.一般vc装完之后会将此路径添加到系统的path中,若出现没有找到该命令提示时,则用执行文件的绝对路径
1、在命令行执行:
dumpbin /exports sqlite3.dll > sqlite3.def
处理后的文件内容为:
Microsoft (R) COFF Binary File Dumper Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
Dump of file sqlite3.dll
File Type: DLL
Section contains the following exports for sqlite3.dll
0 characteristics
4BB10768 time date stamp Tue Mar 30 04:02:48 2010
0.00 version
1 ordinal base
182 number of functions
182 number of names
ordinal hint RVA name
1 0 0001CA44 sqlite3_aggregate_context
2 1 0001CB98 sqlite3_aggregate_count
3 2 00039BBC sqlite3_auto_extension
4 3 00017FC8 sqlite3_backup_finish
5 4 00017798 sqlite3_backup_init
6 5 000180D0 sqlite3_backup_pagecount
7 6 000180C4 sqlite3_backup_remaining
8 7 00017B18 sqlite3_backup_step
9 8 0001D2B0 sqlite3_bind_blob
10 9 0001D2D4 sqlite3_bind_double
11 A 0001D32C sqlite3_bind_int
12 B 0001D348 sqlite3_bind_int64
13 C 0001D3A4 sqlite3_bind_null
14 D 0001D51C sqlite3_bind_parameter_count
15 E 0001D63C sqlite3_bind_parameter_index
16 F 0001D590 sqlite3_bind_parameter_name
17 10 0001D3DC sqlite3_bind_text
18 11 0001D400 sqlite3_bind_text16
19 12 0001D424 sqlite3_bind_value
20 13 0001D4CC sqlite3_bind_zeroblob
21 14 00024C8C sqlite3_blob_bytes
22 15 00024AF8 sqlite3_blob_close
23 16 00024518 sqlite3_blob_open
24 17 00024C44 sqlite3_blob_read
25 18 00024C68 sqlite3_blob_write
26 19 00052084 sqlite3_busy_handler
27 1A 00052138 sqlite3_busy_timeout
28 1B 000517B4 sqlite3_changes
29 1C 0001C208 sqlite3_clear_bindings
30 1D 000518A4 sqlite3_close
31 1E 00053168 sqlite3_collation_needed
32 1F 000531B0 sqlite3_collation_needed16
33 20 0001CCC0 sqlite3_column_blob
34 21 0001CCF8 sqlite3_column_bytes
35 22 0001CD30 sqlite3_column_bytes16
36 23 0001CBA8 sqlite3_column_count
37 24 0001CFF8 sqlite3_column_database_name
38 25 0001D014 sqlite3_column_database_name16
39 26 0001CFC0 sqlite3_column_decltype
40 27 0001CFDC sqlite3_column_decltype16
41 28 0001CD68 sqlite3_column_double
42 29 0001CDA0 sqlite3_column_int
43 2A 0001CDD8 sqlite3_column_int64
44 2B 0001CF88 sqlite3_column_name
45 2C 0001CFA4 sqlite3_column_name16
46 2D 0001D068 sqlite3_column_origin_name
47 2E 0001D084 sqlite3_column_origin_name16
48 2F 0001D030 sqlite3_column_table_name
49 30 0001D04C sqlite3_column_table_name16
50 31 0001CE18 sqlite3_column_text
51 32 0001CE94 sqlite3_column_text16
52 33 0001CECC sqlite3_column_type
53 34 0001CE50 sqlite3_column_value
54 35 00052550 sqlite3_commit_hook
55 36 000013E8 sqlite3_compileoption_get
56 37 0000136C sqlite3_compileoption_used
57 38 00050C34 sqlite3_complete
58 39 00051078 sqlite3_complete16
59 3A 00051390 sqlite3_config
60 3B 0001C9C4 sqlite3_context_db_handle
61 3C 0005301C sqlite3_create_collation
62 3D 000530EC sqlite3_create_collation16
63 3E 00053084 sqlite3_create_collation_v2
64 3F 00052364 sqlite3_create_function
65 40 000523CC sqlite3_create_function16
66 41 00046000 sqlite3_create_module
67 42 00046020 sqlite3_create_module_v2
68 43 0001CBBC sqlite3_data_count
69 44 000516A4 sqlite3_db_config
70 45 0001D728 sqlite3_db_handle
71 46 00051698 sqlite3_db_mutex
72 47 000014B8 sqlite3_db_status
73 48 00046B3C sqlite3_declare_vtab
74 49 00039B7C sqlite3_enable_load_extension
75 4A 0000EE00 sqlite3_enable_shared_cache
76 4B 00052894 sqlite3_errcode
77 4C 000526D4 sqlite3_errmsg
78 4D 000527DC sqlite3_errmsg16
79 4E 000391C8 sqlite3_exec
80 4F 0001C048 sqlite3_expired
81 50 000528E0 sqlite3_extended_errcode
82 51 000535E8 sqlite3_extended_result_codes
83 52 00053630 sqlite3_file_control
84 53 0001C128 sqlite3_finalize
85 54 000045DC sqlite3_free
86 55 00042EEC sqlite3_free_table
87 56 00053200 sqlite3_get_autocommit
88 57 0001CAB0 sqlite3_get_auxdata
89 58 00042D54 sqlite3_get_table
90 59 000531F8 sqlite3_global_recover
91 5A 00051174 sqlite3_initialize
92 5B 00052174 sqlite3_interrupt
93 5C 000517A4 sqlite3_last_insert_rowid
94 5D 000510F0 sqlite3_libversion
95 5E 0005115C sqlite3_libversion_number
96 5F 00052B10 sqlite3_limit
97 60 00039ADC sqlite3_load_extension
98 61 0000604C sqlite3_log
99 62 00004358 sqlite3_malloc
100 63 00004194 sqlite3_memory_alarm
101 64 00004120 sqlite3_memory_highwater
102 65 00004100 sqlite3_memory_used
103 66 00005F80 sqlite3_mprintf
104 67 00003CB8 sqlite3_mutex_alloc
105 68 00003D1C sqlite3_mutex_enter
106 69 00003D00 sqlite3_mutex_free
107 6A 00003D5C sqlite3_mutex_leave
108 6B 00003D38 sqlite3_mutex_try
109 6C 0001D738 sqlite3_next_stmt
110 6D 00052F4C sqlite3_open
111 6E 00052F80 sqlite3_open16
112 6F 00052F64 sqlite3_open_v2
113 70 00009698 sqlite3_os_end
114 71 0000967C sqlite3_os_init
115 72 00052448 sqlite3_overload_function
116 73 0003D460 sqlite3_prepare
117 74 0003D588 sqlite3_prepare16
118 75 0003D5AC sqlite3_prepare16_v2
119 76 0003D484 sqlite3_prepare_v2
120 77 0005250C sqlite3_profile
121 78 000520CC sqlite3_progress_handler
122 79 00006168 sqlite3_randomness
123 7A 000047F0 sqlite3_realloc
124 7B 00003F80 sqlite3_release_memory
125 7C 0001C19C sqlite3_reset
126 7D 00039C68 sqlite3_reset_auto_extension
127 7E 0001C3D4 sqlite3_result_blob
128 7F 0001C3F4 sqlite3_result_double
129 80 0001C414 sqlite3_result_error
130 81 0001C440 sqlite3_result_error16
131 82 0001C57C sqlite3_result_error_code
132 83 0001C5FC sqlite3_result_error_nomem
133 84 0001C5D0 sqlite3_result_error_toobig
134 85 0001C46C sqlite3_result_int
135 86 0001C48C sqlite3_result_int64
136 87 0001C4AC sqlite3_result_null
137 88 0001C4C4 sqlite3_result_text
138 89 0001C4E4 sqlite3_result_text16
139 8A 0001C504 sqlite3_result_text16be
140 8B 0001C524 sqlite3_result_text16le
141 8C 0001C544 sqlite3_result_value
142 8D 0001C560 sqlite3_result_zeroblob
143 8E 000525D8 sqlite3_rollback_hook
144 8F 0002D6E0 sqlite3_set_authorizer
145 90 0001CAD8 sqlite3_set_auxdata
146 91 00051320 sqlite3_shutdown
147 92 00053590 sqlite3_sleep
148 93 00005FA4 sqlite3_snprintf
149 94 00003F20 sqlite3_soft_heap_limit
150 95 00051150 sqlite3_sourceid
151 96 00019440 sqlite3_sql
152 97 00001464 sqlite3_status
153 98 0001C89C sqlite3_step
154 99 0001D778 sqlite3_stmt_status
155 9A 00006A34 sqlite3_strnicmp
156 9B 00053338 sqlite3_table_column_metadata
157 9C 000536F4 sqlite3_test_control
158 9D 00053314 sqlite3_thread_cleanup
159 9E 00051168 sqlite3_threadsafe
160 9F 000517C0 sqlite3_total_changes
161 A0 000524C8 sqlite3_trace
162 A1 0001D6D4 sqlite3_transfer_bindings
163 A2 00052594 sqlite3_update_hook
164 A3 0001C9B4 sqlite3_user_data
165 A4 0001C284 sqlite3_value_blob
166 A5 0001C2C0 sqlite3_value_bytes
167 A6 0001C2D8 sqlite3_value_bytes16
168 A7 0001C2F0 sqlite3_value_double
169 A8 0001C304 sqlite3_value_int
170 A9 0001C318 sqlite3_value_int64
171 AA 0001DCDC sqlite3_value_numeric_type
172 AB 0001C32C sqlite3_value_text
173 AC 0001C344 sqlite3_value_text16
174 AD 0001C35C sqlite3_value_text16be
175 AE 0001C374 sqlite3_value_text16le
176 AF 0001C38C sqlite3_value_type
177 B0 00001050 sqlite3_version
178 B1 000038D0 sqlite3_vfs_find
179 B2 00003990 sqlite3_vfs_register
180 B3 00003A04 sqlite3_vfs_unregister
181 B4 00005F28 sqlite3_vmprintf
182 B5 000084B0 sqlite3_win32_mbcs_to_utf8
Summary
1000 .bss
1000 .data
2000 .edata
1000 .idata
3000 .reloc
2000 .stab
2000 .stabstr
63000 .text
2、编辑 sqlite3.def 文件,使之格式与.def文件格式一致.比如:
将前面的编号去掉.最终结果:
EXPORTS
sqlite3_aggregate_context
sqlite3_aggregate_count
sqlite3_auto_extension
sqlite3_backup_finish
sqlite3_backup_init
sqlite3_backup_pagecount
sqlite3_backup_remaining
sqlite3_backup_step
sqlite3_bind_blob
sqlite3_bind_double
sqlite3_bind_int
sqlite3_bind_int64
sqlite3_bind_null
sqlite3_bind_parameter_count
sqlite3_bind_parameter_index
sqlite3_bind_parameter_name
sqlite3_bind_text
sqlite3_bind_text16
sqlite3_bind_value
sqlite3_bind_zeroblob
sqlite3_blob_bytes
sqlite3_blob_close
sqlite3_blob_open
sqlite3_blob_read
sqlite3_blob_write
sqlite3_busy_handler
sqlite3_busy_timeout
sqlite3_changes
sqlite3_clear_bindings
sqlite3_close
sqlite3_collation_needed
sqlite3_collation_needed16
sqlite3_column_blob
sqlite3_column_bytes
sqlite3_column_bytes16
sqlite3_column_count
sqlite3_column_database_name
sqlite3_column_database_name16
sqlite3_column_decltype
sqlite3_column_decltype16
sqlite3_column_double
sqlite3_column_int
sqlite3_column_int64
sqlite3_column_name
sqlite3_column_name16
sqlite3_column_origin_name
sqlite3_column_origin_name16
sqlite3_column_table_name
sqlite3_column_table_name16
sqlite3_column_text
sqlite3_column_text16
sqlite3_column_type
sqlite3_column_value
sqlite3_commit_hook
sqlite3_compileoption_get
sqlite3_compileoption_used
sqlite3_complete
sqlite3_complete16
sqlite3_config
sqlite3_context_db_handle
sqlite3_create_collation
sqlite3_create_collation16
sqlite3_create_collation_v2
sqlite3_create_function
sqlite3_create_function16
sqlite3_create_module
sqlite3_create_module_v2
sqlite3_data_count
sqlite3_db_config
sqlite3_db_handle
sqlite3_db_mutex
sqlite3_db_status
sqlite3_declare_vtab
sqlite3_enable_load_extension
sqlite3_enable_shared_cache
sqlite3_errcode
sqlite3_errmsg
sqlite3_errmsg16
sqlite3_exec
sqlite3_expired
sqlite3_extended_errcode
sqlite3_extended_result_codes
sqlite3_file_control
sqlite3_finalize
sqlite3_free
sqlite3_free_table
sqlite3_get_autocommit
sqlite3_get_auxdata
sqlite3_get_table
sqlite3_global_recover
sqlite3_initialize
sqlite3_interrupt
sqlite3_last_insert_rowid
sqlite3_libversion
sqlite3_libversion_number
sqlite3_limit
sqlite3_load_extension
sqlite3_log
sqlite3_malloc
sqlite3_memory_alarm
sqlite3_memory_highwater
sqlite3_memory_used
sqlite3_mprintf
sqlite3_mutex_alloc
sqlite3_mutex_enter
sqlite3_mutex_free
sqlite3_mutex_leave
sqlite3_mutex_try
sqlite3_next_stmt
sqlite3_open
sqlite3_open16
sqlite3_open_v2
sqlite3_os_end
sqlite3_os_init
sqlite3_overload_function
sqlite3_prepare
sqlite3_prepare16
sqlite3_prepare16_v2
sqlite3_prepare_v2
sqlite3_profile
sqlite3_progress_handler
sqlite3_randomness
sqlite3_realloc
sqlite3_release_memory
sqlite3_reset
sqlite3_reset_auto_extension
sqlite3_result_blob
sqlite3_result_double
sqlite3_result_error
sqlite3_result_error16
sqlite3_result_error_code
sqlite3_result_error_nomem
sqlite3_result_error_toobig
sqlite3_result_int
sqlite3_result_int64
sqlite3_result_null
sqlite3_result_text
sqlite3_result_text16
sqlite3_result_text16be
sqlite3_result_text16le
sqlite3_result_value
sqlite3_result_zeroblob
sqlite3_rollback_hook
sqlite3_set_authorizer
sqlite3_set_auxdata
sqlite3_shutdown
sqlite3_sleep
sqlite3_snprintf
sqlite3_soft_heap_limit
sqlite3_sourceid
sqlite3_sql
sqlite3_status
sqlite3_step
sqlite3_stmt_status
sqlite3_strnicmp
sqlite3_table_column_metadata
sqlite3_test_control
sqlite3_thread_cleanup
sqlite3_threadsafe
sqlite3_total_changes
sqlite3_trace
sqlite3_transfer_bindings
sqlite3_update_hook
sqlite3_user_data
sqlite3_value_blob
sqlite3_value_bytes
sqlite3_value_bytes16
sqlite3_value_double
sqlite3_value_int
sqlite3_value_int64
sqlite3_value_numeric_type
sqlite3_value_text
sqlite3_value_text16
sqlite3_value_text16be
sqlite3_value_text16le
sqlite3_value_type
sqlite3_version
sqlite3_vfs_find
sqlite3_vfs_register
sqlite3_vfs_unregister
sqlite3_vmprintf
sqlite3_win32_mbcs_to_utf8
3、在命令行执行:
lib /def:sqlite3.def /machine:i386 /out:sqlite3.lib
Microsoft (R) Library Manager Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
Creating library sqlite3.lib and object sqlite3.exp