当前位置: 技术问答>linux和unix
windows下面如何用VC编译开源项目gzip源程序?
来源: 互联网 发布时间:2015-10-23
本文导语: windows下面如何编译开源项目gzip源程序? 下载地址:http://www.gzip.org/gz124src.zip 我编译报错: Compiling... gzip.c Linking... gzip.obj : error LNK2001: unresolved external symbol _zip gzip.obj : error LNK2001: unresolved external symbol _lzw gz...
windows下面如何编译开源项目gzip源程序?
下载地址:http://www.gzip.org/gz124src.zip
我编译报错:
Compiling...
gzip.c
Linking...
gzip.obj : error LNK2001: unresolved external symbol _zip
gzip.obj : error LNK2001: unresolved external symbol _lzw
gzip.obj : error LNK2001: unresolved external symbol _optind
gzip.obj : error LNK2001: unresolved external symbol _optarg
gzip.obj : error LNK2001: unresolved external symbol _getopt_long
gzip.obj : error LNK2001: unresolved external symbol _add_envopt
gzip.obj : error LNK2001: unresolved external symbol _basename
gzip.obj : error LNK2001: unresolved external symbol _display_ratio
gzip.obj : error LNK2001: unresolved external symbol _header_bytes
gzip.obj : error LNK2001: unresolved external symbol _clear_bufs
gzip.obj : error LNK2001: unresolved external symbol _error
gzip.obj : error LNK2001: unresolved external symbol _write_error
gzip.obj : error LNK2001: unresolved external symbol _copy
gzip.obj : error LNK2001: unresolved external symbol _unlzh
gzip.obj : error LNK2001: unresolved external symbol _unlzw
gzip.obj : error LNK2001: unresolved external symbol _unpack
gzip.obj : error LNK2001: unresolved external symbol _check_zipfile
gzip.obj : error LNK2001: unresolved external symbol _unzip
gzip.obj : error LNK2001: unresolved external symbol _fill_inbuf
gzip.obj : error LNK2001: unresolved external symbol _read_error
Debug/gzip.exe : fatal error LNK1120: 20 unresolved externals
Error executing link.exe.
gzip.exe - 21 error(s), 0 warning(s)
下载地址:http://www.gzip.org/gz124src.zip
我编译报错:
Compiling...
gzip.c
Linking...
gzip.obj : error LNK2001: unresolved external symbol _zip
gzip.obj : error LNK2001: unresolved external symbol _lzw
gzip.obj : error LNK2001: unresolved external symbol _optind
gzip.obj : error LNK2001: unresolved external symbol _optarg
gzip.obj : error LNK2001: unresolved external symbol _getopt_long
gzip.obj : error LNK2001: unresolved external symbol _add_envopt
gzip.obj : error LNK2001: unresolved external symbol _basename
gzip.obj : error LNK2001: unresolved external symbol _display_ratio
gzip.obj : error LNK2001: unresolved external symbol _header_bytes
gzip.obj : error LNK2001: unresolved external symbol _clear_bufs
gzip.obj : error LNK2001: unresolved external symbol _error
gzip.obj : error LNK2001: unresolved external symbol _write_error
gzip.obj : error LNK2001: unresolved external symbol _copy
gzip.obj : error LNK2001: unresolved external symbol _unlzh
gzip.obj : error LNK2001: unresolved external symbol _unlzw
gzip.obj : error LNK2001: unresolved external symbol _unpack
gzip.obj : error LNK2001: unresolved external symbol _check_zipfile
gzip.obj : error LNK2001: unresolved external symbol _unzip
gzip.obj : error LNK2001: unresolved external symbol _fill_inbuf
gzip.obj : error LNK2001: unresolved external symbol _read_error
Debug/gzip.exe : fatal error LNK1120: 20 unresolved externals
Error executing link.exe.
gzip.exe - 21 error(s), 0 warning(s)
|
用VC创建一个空的project(类型选择Makefile),然后把gzip的源码复制到项目
目录,把gzip/nt目录下的Makefile.nt复制成项目目录下的gzip.mak
然后直接在VC里面build就可以了
目录,把gzip/nt目录下的Makefile.nt复制成项目目录下的gzip.mak
然后直接在VC里面build就可以了