我有 Windows 7 Pro x86 和 Visual Studio 2010 Pro。另外我在 c:\MinGW 中有 MinGW。
我想使用 Visual C++ 在 windows 下构建 nginx。我关注 this指导。
结果是以下错误:
Microsoft (R) Program Maintenance Utility Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
'install' is up-to-date
cl -O2 -W4 -WX -nologo -MT -Zi -DFD_SETSIZE=1024 -DNO_SYS_TYPES_H
-Ycng x_config.h -Fpobjs/ngx_config.pch -c -I src/core-I src/event
-I src/event/mod ules -I src/os/win32 -I objs/lib/pcre-8.32
-I objs/lib/openssl/openssl/include -I objs/lib/zlib-1.2.7 -I objs
-I src/http -I src/http/modules -I src/mail -Foobjs/ngx_pch.obj
objs/ngx_pch.c ngx_pch.c
cl -c -O2 -W4 -WX -nologo -MT -Zi -DFD_SETSIZE=1024 -DNO_SYS_TYPES_H
-Y ungx_config.h -Fpobjs/ngx_config.pch -I src/core-I src/event
-I src/event/mod ules -I src/os/win32 -I objs/lib/pcre-8.32
-I objs/lib/openssl/openssl/include -I objs/lib/zlib-1.2.7 -I objs
-I src/http -I src/http/modules -I src/mail -Foobjs/src/core/nginx.obj
src/core/nginx.c nginx.c
c:\nginx\source\src\event\ngx_event_openssl.h(15) : fatal error C1083:
Cannot open include file: 'openssl/ssl.h': No such file or directory
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio
10.0\VC\BI N\cl.EXE"' : return code '0x2' Stop.
但是 OpenSSL 位于 C:\nginx\source\objs\lib\openssl
我做错了什么?
最佳答案
我有同样的问题。
该问题与使用 Perl 构建处理某些文件的 eol(行尾)有关。
您不应使用 MSYS Perl 构建。
相反,您应该使用 ActivePerl 或 StrawberryPerl,如 guide 所示。 .
在 MSYS Perl 之前,请确保 PATH 指向适当的 Perl 发行版。
export PATH=/appropriate/perl/dist:$PATH
此 answer帮我解决了问题。
关于visual-c++ - 使用 MSYS 在 Windows 7 中构建 nginx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13926353/