Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows Support #24

Closed
ewwink opened this issue Jan 28, 2014 · 4 comments
Closed

Add Windows Support #24

ewwink opened this issue Jan 28, 2014 · 4 comments

Comments

@ewwink
Copy link

ewwink commented Jan 28, 2014

I follow instruction http://nginx.org/en/docs/howto_build_on_win32.html and it success but when I add --add-module=objs/lib/headers-more I got a lot off error

objs/lib/headers-more/src/ngx_http_headers_more_filter_module.c(260) : warning C4431: missing typespecifier - int assumed. Note: C no longer supports default-int
objs/lib/headers-more/src/ngx_http_headers_more_filter_module.c(260) : error C2054: expected '(' to follow 'r'
objs/lib/headers-more/src/ngx_http_headers_more_filter_module.c(332) : error C2143: syntax error :missing ')' before '*'
objs/lib/headers-more/src/ngx_http_headers_more_filter_module.c(332) : error C2143: syntax error :missing '{' before '*'
objs/lib/headers-more/src/ngx_http_headers_more_filter_module.c(332) : error C2059: syntax error :')'
objs/lib/headers-more/src/ngx_http_headers_more_filter_module.c(333) : warning C4431: missing typespecifier - int assumed. Note: C no longer supports default-int
objs/lib/headers-more/src/ngx_http_headers_more_filter_module.c(333) : error C2054: expected '(' to follow 'cf'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\cl.EXE"' : return code '0x2'
Stop.

full error report http://pastebin.com/raw.php?i=PbdWa6aG

Please support windows build.

thanks

@ewwink
Copy link
Author

ewwink commented Jan 28, 2014

Finally found the solution,
in objs/Makefile delete -WX and in ddebug.h add #include <ngx_config.h> after line #include <nginx.h>
and also in

ngx_http_headers_more_filter_module.c
ngx_http_headers_more_headers_in.c
ngx_http_headers_more_headers_out.c
ngx_http_headers_more_util.c

replace

#include "ddebug.h"

with

#include <ngx_config.h>
#include "ddebug.h"

I don't know why it make different but finally I can compile Nginx 1.5.10 with headers-more-nginx-module 💃

@agentzh
Copy link
Member

agentzh commented Jan 28, 2014

@ewwink Thank you for sharing your experience! This modules does not officially support Windows yet because I haven't found the time to set up a Windows development environment for myself :)

@ewwink
Copy link
Author

ewwink commented Jan 28, 2014

you are welcome and I can confirmed it working, I will close it now and once again @agentzh thanks for the module.

@harryqt
Copy link

harryqt commented Jul 26, 2019

working for me too.. thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants