Fwd: Adding dynamic library to nginx module

Amita Shirish Amte aamte at petabi.com
Tue Aug 2 18:52:49 UTC 2016



> Begin forwarded message:
> 
> From: Amita Shirish Amte <aamte at petabi.com>
> Subject: Adding dynamic library to nginx module
> Date: August 2, 2016 at 11:19:24 AM PDT
> To: nginx at nginx.org
> 
> Hi,
> 
> My name is Amita and I am  newbie in using nginx. I am writing a dynamic nginx http module which needs to link to a dynamic library. Currently, I have the following config file :
> 
> ngx_addon_name=ngx_http_remake_module 
> CORE_LIBS="$CORE_LIBS -L /usr/local/lib/libtest_web.dylib"
> if test -n "$ngx_module_link"; then
>   ngx_module_type=HTTP
>   ngx_module_name=$ngx_addon_name
>   ngx_module_incs=
>   ngx_module_deps=
>   ngx_module_srcs="$ngx_addon_dir/ngx_http_remake_module.c"
>   ngx_module_libs=
>  . auto/module
> else
>   HTTP_MODULES="$HTTP_MODULES ngx_http_remake_module"
>   NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_remake_module.c"
> fi
> 
> When I run sudo make, I get the following clang error: clang: error: no such file or directory: ‘libtest_web.dylib’, kindly let me know how exactly should I load the dynamic library or where should it be located so that nginx will automatically link it to the module.
> 
> Thanks for the help and time.
> 
> Regards,
> Amita

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160802/167e5a32/attachment.html>


More information about the nginx mailing list