有些linux下的开源源码编译后只生成.dll文件,为了在vc中使用,需要生成.lib文件。
步骤如下:
1. 打开Visual Studio命令提示窗口,切换到.dll路径下
2. 使用dumpbin命令:
dumpbin /exports libzbar-0.dll >lib.txt
lib.txt内容如下:
Microsoft (R) COFF/PE Dumper Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file libzbar-0.dll
File Type: DLL
Section contains the following exports for libzbar-0.dll
00000000 characteristics
518F66D6 time date stamp Sun May 12 17:54:30 2013
0.00 version
1 ordinal base
119 number of functions
119 number of names
ordinal hint RVA name
1 0 00001CC0 _zbar_error_spew = _convert_yuv_unpack
2 1 000018BC _zbar_error_string
3 2 00001888 _zbar_get_error_code
4 3 0000B000 zbar_decode_width
5 4 0000AE64 zbar_decoder_create
6 5 0000AD9C zbar_decoder_destroy
7 6 0000AFB8 zbar_decoder_get_color
8 7 0000AFC4 zbar_decoder_get_data
9 8 0000AFCC zbar_decoder_get_data_length
10 9 0000AFF8 zbar_decoder_get_type
11 A 0000AFF0 zbar_decoder_get_userdata
12 B 0000AF24 zbar_decoder_new_scan
13 C 0000ADC0 zbar_decoder_reset
14 D 0000B120 zbar_decoder_set_config
15 E 0000AFD4 zbar_decoder_set_handler
16 F 0000AFE4 zbar_decoder_set_userdata
17 10 00001DBC zbar_get_addon_name
18 11 00001D1C zbar_get_symbol_name
19 12 0000483C zbar_image_convert
20 13 000046DC zbar_image_convert_resize
21 14 0000260C zbar_image_copy
22 15 00002304 zbar_image_create
23 16 00002404 zbar_image_destroy
24 17 000026D0 zbar_image_first_symbol
25 18 00002360 zbar_image_free_data