我使用nmake编译程序时报C1083错,错误信息如下:D:\Projects\gdal-1.1.8\port>nmake makefile.vcMicrosoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.        cl /nologo /Ox -I..\port -I..\ogr -I..\core  /c cpl_conv.cpp cpl_conv.cpp
d:\Projects\gdal-1.1.8\port\cpl_port.h(139) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.我猜测是环境变量没设好,但我已经运行vcvars32.bat,他返回:
D:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin>"D:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat"
Setting environment for using Microsoft Visual Studio .NET 2003 tools.
(If you have another version of Visual Studio or Visual C++ installed and wish to use its tools from the command line, run vcvars32.bat for that version.)我还需要做什么设置么?

解决方案 »

  1.   


     从你给出的信息看 ,应该是编译器没找到 stdio.h文件 你可以找一下stdio.h文件 在 哪一个目录, 假设 为  d:\vc\include, 就再设置一下 :    set include=d:\vc\include;%include% 再运行 namke 试试看
      

  2.   

    原因已找到,我是在dos环境运行vcvars32,nmake,当因为不是在一个command窗口,vcvars32地执行结果对namke没有作用。
    多谢各位!
    散分