Hello,
I am trying to build a simple nginx module to learn more about nginx’s
internals. I have copied several hello world examples into my own
module: /* * ngx_http_hello_dolly.c */#include <ngx_config.h>#include <ngx_cor - Pastebin.com
And the config file: ngx_addon_name=ngx_http_hello_dollyHTTP_MODULES="$HTTP_MODULES ngx_http_hello_ - Pastebin.com
I’ve downloaded nginx 1.7.8 onto a vanilla Ubuntu 14.04 install. I run
configure with the following:
root@dev:/usr/local/src/nginx-1.7.8# ./configure --with-debug
–add-module=/usr/local/src/ngx_hello_dolly
I see that configure adds it in properly:
[… snip …]
adding module in /usr/local/src/ngx_hello_dolly
- ngx_http_hello_dolly was configured
[… snip …]
But when I run make I receive the following error:
objs/addon/ngx_hello_dolly/ngx_http_hello_dolly.o
objs/ngx_modules.o
-lpthread -lcrypt -lpcre -lcrypto -lcrypto -lz
objs/ngx_modules.o:(.data+0x110): undefined reference to
ngx_http_hello_dolly' collect2: error: ld returned 1 exit status make[1]: *** [objs/nginx] Error 1 make[1]: Leaving directory
/usr/local/src/nginx-1.7.8’
make: *** [build] Error 2
Fule make output is at: root@dev:/usr/local/src/nginx-1.7.8# make -j8make -f objs/Makefilemake[1]: E - Pastebin.com
Can anyone point me in the direction of what I’m doing wrong? I don’t
understand why the build process errors out with undefined reference to
`ngx_http_hello_dolly’. Have I mistyped something in my module? I cannot
see any discrepancy between this and something such as
(ZhuZhaoyuan.com is for sale | HugeDomains).
Much appreciated if anyone can point me in the right direction!