在vs 2008上编译shapelib库过程
分享
以前都是在vc6.0上使用开源的shapelib库,最近要使用filegdb api,因此必须使用vs 2008,因此使用vs 2008的nmake命令来编译一下shapelib库,但是在编译过程报如下错误:
D:/shapelib-1.3.0b2>nmake -f makefile.vc
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c shpopen.c
NMAKE : fatal error U1077: '"D:/Program Files/Microsoft Visual Studio 9.0/VC/bin
/cl.EXE"' : return code '0xc0000135'
Stop.
发现是vc 9的cl(compile link)文件出了问题,但是无法确定到底出了什么问题,因此在cmd下直接运行cl后发现
报如下错误:
找不到mspdb80.dll这个动态库,搜了一下vs2008的目录,发现"D:/Program Files/Microsoft Visual Studio 9.0/VC/bin
目录下的确没有这个文件,但是在"D:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE”目录下有这个动态库,
将mspdb80.dll拷贝到D:/Program Files/Microsoft Visual Studio 9.0/VC/bin后,继续运行nmake后,继续报错:
D:/shapelib-1.3.0b2>nmake -f makefile.vc
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c shpopen.c
shpopen.c
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c dbfopen.c
dbfopen.c
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c shptree.c
shptree.c
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c safileio.c
safileio.c
lib /nologo /out:shapelib.lib shpopen.obj dbfopen.obj shptree.obj safile
io.obj
link /nologo /dll /out:shapelib.dll /implib:shapelib_i.lib shpopen.obj d
bfopen.obj shptree.obj safileio.obj
Creating library shapelib_i.lib and object shapelib_i.exp
if exist shapelib.dll.manifest mt /nologo -manifest shapelib.dll.manifes
t -outputresource:shapelib.dll;2
'mt' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
NMAKE : fatal error U1077: 'if' : return code '0x1'
Stop.
找不到mt.exe,到硬盘上继续找,发现在SDK中有这个文件,因此将SDK加入到PATH环境变量中,继续nmake编译,搞定:
D:/shapelib-1.3.0b2>nmake -f makefile.vc
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c shpopen.c
shpopen.c
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c dbfopen.c
dbfopen.c
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c shptree.c
shptree.c
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c safileio.c
safileio.c
lib /nologo /out:shapelib.lib shpopen.obj dbfopen.obj shptree.obj safile
io.obj
link /nologo /dll /out:shapelib.dll /implib:shapelib_i.lib shpopen.obj d
bfopen.obj shptree.obj safileio.obj
Creating library shapelib_i.lib and object shapelib_i.exp
if exist shapelib.dll.manifest mt /nologo -manifest shapelib.dll.manifes
t -outputresource:shapelib.dll;2
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT shpcreate.c shapelib_i.lib
shpcreate.c
if exist shpcreate.exe.manifest mt -manifest shpcreate.exe.manifest -out
putresource:shpcreate.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT shpadd.c shapelib_i.lib
shpadd.c
if exist shpadd.exe.manifest mt -manifest shpadd.exe.manifest -outputres
ource:shpadd.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT shpdump.c shapelib_i.lib
shpdump.c
if exist shpdump.exe.manifest mt -manifest shpdump.exe.manifest -outputr
esource:shpdump.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT shprewind.c shapelib_i.lib
shprewind.c
if exist shprewind.exe.manifest mt -manifest shprewind.exe.manifest -out
putresource:shprewind.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT dbfcreate.c shapelib_i.lib
dbfcreate.c
if exist dbfcreate.exe.manifest mt -manifest dbfcreate.exe.manifest -out
putresource:dbfcreate.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT dbfadd.c shapelib_i.lib
dbfadd.c
if exist dbfadd.exe.manifest mt -manifest dbfadd.exe.manifest -outputres
ource:dbfadd.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT dbfdump.c shapelib_i.lib
dbfdump.c
if exist dbfdump.exe.manifest mt -manifest dbfdump.exe.manifest -outputr
esource:dbfdump.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT shptest.c shapelib_i.lib
shptest.c
if exist shptest.exe.manifest mt -manifest shptest.exe.manifest -outputr
esource:shptest.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT shptreedump.c shapelib_i.lib
shptreedump.c
if exist shptreedump.exe.manifest mt -manifest shptreedump.exe.manifest
-outputresource:shptreedump.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
文章来源:http://blog.csdn.net/liufeng1980423/article/details/6170733
D:/shapelib-1.3.0b2>nmake -f makefile.vc
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c shpopen.c
NMAKE : fatal error U1077: '"D:/Program Files/Microsoft Visual Studio 9.0/VC/bin
/cl.EXE"' : return code '0xc0000135'
Stop.
发现是vc 9的cl(compile link)文件出了问题,但是无法确定到底出了什么问题,因此在cmd下直接运行cl后发现
报如下错误:
找不到mspdb80.dll这个动态库,搜了一下vs2008的目录,发现"D:/Program Files/Microsoft Visual Studio 9.0/VC/bin
目录下的确没有这个文件,但是在"D:/Program Files/Microsoft Visual Studio 9.0/Common7/IDE”目录下有这个动态库,
将mspdb80.dll拷贝到D:/Program Files/Microsoft Visual Studio 9.0/VC/bin后,继续运行nmake后,继续报错:
D:/shapelib-1.3.0b2>nmake -f makefile.vc
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c shpopen.c
shpopen.c
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c dbfopen.c
dbfopen.c
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c shptree.c
shptree.c
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c safileio.c
safileio.c
lib /nologo /out:shapelib.lib shpopen.obj dbfopen.obj shptree.obj safile
io.obj
link /nologo /dll /out:shapelib.dll /implib:shapelib_i.lib shpopen.obj d
bfopen.obj shptree.obj safileio.obj
Creating library shapelib_i.lib and object shapelib_i.exp
if exist shapelib.dll.manifest mt /nologo -manifest shapelib.dll.manifes
t -outputresource:shapelib.dll;2
'mt' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
NMAKE : fatal error U1077: 'if' : return code '0x1'
Stop.
找不到mt.exe,到硬盘上继续找,发现在SDK中有这个文件,因此将SDK加入到PATH环境变量中,继续nmake编译,搞定:
D:/shapelib-1.3.0b2>nmake -f makefile.vc
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c shpopen.c
shpopen.c
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c dbfopen.c
dbfopen.c
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c shptree.c
shptree.c
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT -c safileio.c
safileio.c
lib /nologo /out:shapelib.lib shpopen.obj dbfopen.obj shptree.obj safile
io.obj
link /nologo /dll /out:shapelib.dll /implib:shapelib_i.lib shpopen.obj d
bfopen.obj shptree.obj safileio.obj
Creating library shapelib_i.lib and object shapelib_i.exp
if exist shapelib.dll.manifest mt /nologo -manifest shapelib.dll.manifes
t -outputresource:shapelib.dll;2
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT shpcreate.c shapelib_i.lib
shpcreate.c
if exist shpcreate.exe.manifest mt -manifest shpcreate.exe.manifest -out
putresource:shpcreate.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT shpadd.c shapelib_i.lib
shpadd.c
if exist shpadd.exe.manifest mt -manifest shpadd.exe.manifest -outputres
ource:shpadd.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT shpdump.c shapelib_i.lib
shpdump.c
if exist shpdump.exe.manifest mt -manifest shpdump.exe.manifest -outputr
esource:shpdump.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT shprewind.c shapelib_i.lib
shprewind.c
if exist shprewind.exe.manifest mt -manifest shprewind.exe.manifest -out
putresource:shprewind.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT dbfcreate.c shapelib_i.lib
dbfcreate.c
if exist dbfcreate.exe.manifest mt -manifest dbfcreate.exe.manifest -out
putresource:dbfcreate.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT dbfadd.c shapelib_i.lib
dbfadd.c
if exist dbfadd.exe.manifest mt -manifest dbfadd.exe.manifest -outputres
ource:dbfadd.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT dbfdump.c shapelib_i.lib
dbfdump.c
if exist dbfdump.exe.manifest mt -manifest dbfdump.exe.manifest -outputr
esource:dbfdump.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT shptest.c shapelib_i.lib
shptest.c
if exist shptest.exe.manifest mt -manifest shptest.exe.manifest -outputr
esource:shptest.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
cl /nologo /Ox /MD /DSHAPELIB_DLLEXPORT shptreedump.c shapelib_i.lib
shptreedump.c
if exist shptreedump.exe.manifest mt -manifest shptreedump.exe.manifest
-outputresource:shptreedump.exe;1
Microsoft (R) Manifest Tool version 5.2.3790.2076
Copyright (c) Microsoft Corporation 2005.
All rights reserved.
文章来源:http://blog.csdn.net/liufeng1980423/article/details/6170733
0 个评论
相关问题
- 在server 2008 R2 安装 Portal for arcgis 时,显示数据密码无效“Invalid password”
- 发布服务过程报001270:consolidate data错误
- 安装过程中的问题
- arcgis engine 10.4 电脑是windows server 2008 r2
- Enterprise中的联合服务器和server中的添加计算机在构建集群的过程中有什么区别?
- 应用ArcGIS中的水文分析过程,建立至少20个单元流入同一位置的排水路径。请问这步操作怎么实现?
- 如何停掉缓存切图过程?
- FAQ: 在版本和非版本数据之间创建relationship的过程是怎样的?
- Howto: 手动执行ArcSDE for SQL Server 2005/2008-单数据库模型的post 安装
- Server10.2版本,SOE模板编译成功,但没有生成.soe文件
- Problem: ArcGIS processes are taking much longer to run on Windows Server 2012 than Windows Server 2008