H
H
HADOEDA2018-07-18 11:29:39
Nginx
HADOEDA, 2018-07-18 11:29:39

How to properly use precompiled pch headers with Visual Studio's cl compiler?

I am compiling nginx for windows with nginx-push-stream-module
using Visual Studio compiler.
The instruction that compiles the nginx-push-stream-module module fails with the error:
'fatal error C1010: unexpected end of file while looking for a precompiled header. You may have forgotten to add the '#include "ngx_config.h"' directive to the source.'
The instruction itself looks like this
cl -c -O2 -W4 -WX -nologo -MT -Zi -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/os/win32 -I objs/lib/nginx-push-stream-module/src -I objs/lib/nginx-push-stream-module/include -I objs/lib/pcre-8.41 -I objs/lib/ openssl-1.1.1-pre8/openssl/include -I objs/lib/zlib-1.2.11 -I objs -I src/http -I src/http/modules -Foobjs/addon/src/ngx_http_push_stream_module.obj objs/lib /nginx-push-stream-module/src/ngx_http_push_stream_module.c
-Yungx_config.h -Fpobjs/ngx_config.pch - use precompiled header.
and if you look at the sources https://github.com/wandenberg/nginx-push-stream-module
src/ngx_http_push_stream_module.c there really is no call to "#include "ngx_config.h"" in the file
although there is a call to ngx_http_push_stream_module.h in it, at the beginning of the file, in which "ngx_config.h" is called.
I so understand that the compiler does not see it. Maybe you can somehow tell him that the call h file?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question