nmake编译错误
我对 C 非常陌生,正在尝试编译为 Apache 的特定 .so
模块,但我遇到了问题。
我得到的来自 nmake
的致命错误附在下面。命令前面的“cl”从何而来?我执行的批处理文件也被附加。
任何帮助将不胜感激。
Windows 命令行输出
cl /nologo /W3 /WX /LD /MT /Ot /Ox /Oi /Oy /Ob2 /GF /Gy /I include /I "..\httpd\i
nclude" /I "..\httpd\srclib\apr\include" /I "..\httpd\srclib\apr-util\include" /I "..\http
d\os\win32" /I "C:\Program Files\Microsoft SDKs\Windows\v7.0A\include" /I "C:\Program File
s\Microsoft Visual Studio 10.0\VC\include" /D WIN32 /c %CD%\src\mod_auth_sspi.c /FoRelease
\mod_auth_sspi.obj
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.
修改后的 make.bat 来自 这里
echo off
::Configuration Area
set PLATSDKDIR=C:\Program Files\Microsoft SDKs\Windows\v7.0A
REM I could not find SetEnv anywhere for Win7 / VS2010:
REM set SDK_Init=c:\Programs\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.Cmd
REM maybe could use setx XXX somehow for the above?
set MSVCDIR=C:\Program Files\Microsoft Visual Studio 10.0\VC
set NMAKE_Opts=/NOLOGO
set APACHE22_HOME=..\httpd
REM i am not sure what the meaning of the above paramater is, do i need to point to apache source code or apache server to compile?
set APSRC=1
set NMAKEHOME=C:\Program Files\Microsoft Visual Studio 10.0\VC\bin
set BUILD_TYPE=Release
set DEBUG=0
REM %SDK_Init% not set so have commented this out
REM call "%SDK_Init%" /%BUILD_TYPE%
call "%NMAKEHOME%\nmake" %NMAKE_Opts% "MSVCDIR=%MSVCDIR%" "PLATSDKDIR=%PLATSDKDIR%" "APACHE22_HOME=%APACHE22_HOME%" "APSRC=%APSRC%" "DEBUG=%DEBUG%" dist
@echo.
pause
I'm very new to C and am trying to compile to a specific .so
module for Apache, but I'm running into problems.
The fatal error from nmake
I get is appended below. Where does the prepend of "cl" to the command come from? The batch file that I execute is also appended.
Any help would be dearly appreciated.
Windows command-line output
cl /nologo /W3 /WX /LD /MT /Ot /Ox /Oi /Oy /Ob2 /GF /Gy /I include /I "..\httpd\i
nclude" /I "..\httpd\srclib\apr\include" /I "..\httpd\srclib\apr-util\include" /I "..\http
d\os\win32" /I "C:\Program Files\Microsoft SDKs\Windows\v7.0A\include" /I "C:\Program File
s\Microsoft Visual Studio 10.0\VC\include" /D WIN32 /c %CD%\src\mod_auth_sspi.c /FoRelease
\mod_auth_sspi.obj
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.
Modified make.bat from here
echo off
::Configuration Area
set PLATSDKDIR=C:\Program Files\Microsoft SDKs\Windows\v7.0A
REM I could not find SetEnv anywhere for Win7 / VS2010:
REM set SDK_Init=c:\Programs\Microsoft SDKs\Windows\v6.1\Bin\SetEnv.Cmd
REM maybe could use setx XXX somehow for the above?
set MSVCDIR=C:\Program Files\Microsoft Visual Studio 10.0\VC
set NMAKE_Opts=/NOLOGO
set APACHE22_HOME=..\httpd
REM i am not sure what the meaning of the above paramater is, do i need to point to apache source code or apache server to compile?
set APSRC=1
set NMAKEHOME=C:\Program Files\Microsoft Visual Studio 10.0\VC\bin
set BUILD_TYPE=Release
set DEBUG=0
REM %SDK_Init% not set so have commented this out
REM call "%SDK_Init%" /%BUILD_TYPE%
call "%NMAKEHOME%\nmake" %NMAKE_Opts% "MSVCDIR=%MSVCDIR%" "PLATSDKDIR=%PLATSDKDIR%" "APACHE22_HOME=%APACHE22_HOME%" "APSRC=%APSRC%" "DEBUG=%DEBUG%" dist
@echo.
pause
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
cl是vs c编译器,报错说找不到编译器。我想问题就在这里:
cl is the vs c compiler, and the error says it can't find the compiler. I guess the issue is here: