I tried to build it, following the steps from https://github.com/aperezdc/ngx-fancyindex#building
First I installed nginx's Windows version and got these build flags:
--with-cc=cl --builddir=objs.msvc8 --with-debug --prefix= --conf-path=conf/nginx.conf --pid-path=logs/nginx.pid --http-log-path=logs/access.log --error-log-path=logs/error.log --sbin-path=nginx.exe --http-client-body-temp-path=temp/client_body_temp --http-proxy-temp-path=temp/proxy_temp --http-fastcgi-temp-path=temp/fastcgi_temp --http-scgi-temp-path=temp/scgi_temp --http-uwsgi-temp-path=temp/uwsgi_temp --with-cc-opt=-DFD_SETSIZE=1024 --with-pcre=objs.msvc8/lib/pcre2-10.47 --with-zlib=objs.msvc8/lib/zlib-1.3.1 --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_stub_status_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_slice_module --with-mail --with-stream --with-stream_realip_module --with-stream_ssl_preread_module --with-openssl=objs.msvc8/lib/openssl-3.5.5 --with-openssl-opt='no-asm no-tests no-makedepend -D_WIN32_WINNT=0x0501' --with-http_ssl_module --with-mail_ssl_module --with-stream_ssl_module
Then I omitted the msvc8 part and added --add-dynamic-module=../ngx-fancyindex flag, and although nginx itself built successfully, building the module stopped because of warning:
cl -c -O2 -W4 -WX -nologo -MT -Zi -Fdobjs/nginx.pdb -DFD_SETSIZE=1024 -DNO_SYS_TYPES_H -Yungx_config.h -Fpobjs/ngx_config.pch -I src/core -I src/event -I src/event/modules -I src/event/quic -I src/os/win32 -I objs/lib/pcre2-10.47/src/ -I objs/lib/openssl-3.6.1/openssl/include -I objs/lib/zlib-1.3.2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream -Foobjs/addon/ngx-fancyindex/ngx_http_fancyindex_module.obj ../ngx-fancyindex/ngx_http_fancyindex_module.c
ngx_http_fancyindex_module.c
../ngx-fancyindex/ngx_http_fancyindex_module.c(1013): error C2220: the following warning is treated as an error
../ngx-fancyindex/ngx_http_fancyindex_module.c(1013): warning C4457: declaration of 'r' hides function parameter
../ngx-fancyindex/ngx_http_fancyindex_module.c(667): note: see declaration of 'r'
NMAKE : fatal error U1077: 'cl -c -O2 -W4 -WX -nologo -MT -Zi -Fdobjs/nginx.pdb -DFD_SETSIZE=1024 -DNO_SYS_TYPES_H -Yungx_config.h -Fpobjs/ngx_config.pch -I src/core -I src/event -I src/event/modules -I src/event/quic -I src/os/win32 -I objs/lib/pcre2-10.47/src/ -I objs/lib/openssl-3.6.1/openssl/include -I objs/lib/zlib-1.3.2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream -Foobjs/addon/ngx-fancyindex/ngx_http_fancyindex_module.obj ../ngx-fancyindex/ngx_http_fancyindex_module.c' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\bin\HostX86\x86\nmake.exe" -f objs/Makefile' : return code '0x2'
Stop.
I then omitted the "stop on warning" flag -WX, but building was failed anyway, and I have no idea what should I do:
cl -c -O2 -W4 -nologo -MT -Zi -Fdobjs/nginx.pdb -DFD_SETSIZE=1024 -DNO_SYS_TYPES_H -Yungx_config.h -Fpobjs/ngx_config.pch -I src/core -I src/event -I src/event/modules -I src/event/quic -I src/os/win32 -I objs/lib/pcre2-10.47/src/ -I objs/lib/openssl-3.6.1/openssl/include -I objs/lib/zlib-1.3.2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream -Foobjs/addon/ngx-fancyindex/ngx_http_fancyindex_module.obj ../ngx-fancyindex/ngx_http_fancyindex_module.c
ngx_http_fancyindex_module.c
../ngx-fancyindex/ngx_http_fancyindex_module.c(1013): warning C4457: declaration of 'r' hides function parameter
../ngx-fancyindex/ngx_http_fancyindex_module.c(667): note: see declaration of 'r'
cl -c -O2 -W4 -nologo -MT -Zi -Fdobjs/nginx.pdb -DFD_SETSIZE=1024 -DNO_SYS_TYPES_H -Yungx_config.h -Fpobjs/ngx_config.pch -I src/core -I src/event -I src/event/modules -I src/event/quic -I src/os/win32 -I objs/lib/pcre2-10.47/src/ -I objs/lib/openssl-3.6.1/openssl/include -I objs/lib/zlib-1.3.2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream -Foobjs/ngx_http_fancyindex_module_modules.obj objs/ngx_http_fancyindex_module_modules.c
ngx_http_fancyindex_module_modules.c
cl @C:\Users\HERTAT~1\AppData\Local\Temp\2\nm867C.tmp
Microsoft (R) C/C++ Optimizing Compiler Version 19.50.35725 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl -Feobjs/ngx_http_fancyindex_module.so
objs/addon/ngx-fancyindex/ngx_http_fancyindex_module.obj
objs/ngx_http_fancyindex_module_modules.obj
kernel32.lib user32.lib advapi32.lib ws2_32.lib objs/lib/pcre2-10.47/src/pcre2-8.lib objs/lib/openssl-3.6.1/openssl/lib/libssl.lib objs/lib/openssl-3.6.1/openssl/lib/libcrypto.lib gdi32.lib crypt32.lib objs/lib/zlib-1.3.2/zlib.lib
objs/nginx.res -link -verbose:lib -debug objs/ngx_pch.obj
-shared
cl : Command line warning D9002 : ignoring unknown option '-shared'
Microsoft (R) Incremental Linker Version 14.50.35725.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:objs/ngx_http_fancyindex_module.so
-verbose:lib
-debug
objs/ngx_pch.obj
objs/addon/ngx-fancyindex/ngx_http_fancyindex_module.obj
objs/ngx_http_fancyindex_module_modules.obj
kernel32.lib
user32.lib
advapi32.lib
ws2_32.lib
objs/lib/pcre2-10.47/src/pcre2-8.lib
objs/lib/openssl-3.6.1/openssl/lib/libssl.lib
objs/lib/openssl-3.6.1/openssl/lib/libcrypto.lib
gdi32.lib
crypt32.lib
objs/lib/zlib-1.3.2/zlib.lib
objs/nginx.res
Searching libraries
Searching C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x86\kernel32.lib:
Searching C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x86\user32.lib:
Searching C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x86\advapi32.lib:
Searching C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x86\ws2_32.lib:
Searching objs\lib\pcre2-10.47\src\pcre2-8.lib:
Searching objs\lib\openssl-3.6.1\openssl\lib\libssl.lib:
Searching objs\lib\openssl-3.6.1\openssl\lib\libcrypto.lib:
Searching C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x86\gdi32.lib:
Searching C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x86\crypt32.lib:
Searching objs\lib\zlib-1.3.2\zlib.lib:
Searching C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\lib\x86\LIBCMT.lib:
Searching C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\lib\x86\OLDNAMES.lib:
Searching C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x86\kernel32.lib:
Searching C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x86\user32.lib:
Searching C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x86\advapi32.lib:
Searching C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x86\ws2_32.lib:
Searching objs\lib\pcre2-10.47\src\pcre2-8.lib:
Searching objs\lib\openssl-3.6.1\openssl\lib\libssl.lib:
Searching objs\lib\openssl-3.6.1\openssl\lib\libcrypto.lib:
Searching C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x86\gdi32.lib:
Searching C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x86\crypt32.lib:
Searching objs\lib\zlib-1.3.2\zlib.lib:
Searching C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\lib\x86\LIBCMT.lib:
Searching C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\lib\x86\OLDNAMES.lib:
Finished searching libraries
LINK : fatal error LNK1561: entry point must be defined
NMAKE : fatal error U1077: 'cl @C:\Users\HERTAT~1\AppData\Local\Temp\2\nm867C.tmp' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\bin\HostX86\x86\nmake.exe" -f objs/Makefile' : return code '0x2'
Stop.
I tried to build it, following the steps from https://github.com/aperezdc/ngx-fancyindex#building
First I installed nginx's Windows version and got these build flags:
Then I omitted the
msvc8part and added--add-dynamic-module=../ngx-fancyindexflag, and although nginx itself built successfully, building the module stopped because of warning:I then omitted the "stop on warning" flag
-WX, but building was failed anyway, and I have no idea what should I do: