openresty / lua-upstream-nginx-module

Nginx C module to expose Lua API to ngx_lua for Nginx upstreams
501 stars 151 forks source link

unresolved external symbol2 (2) #21

Open itpp16 opened 8 years ago

itpp16 commented 8 years ago

error LNK2019: unresolved external symbol _ngx_http_lua_get_request referenced in function _ngx_http_lua_upstream_get_upstream_main_conf

error LNK2019: unresolved external symbol _ngx_http_lua_add_package_preload referenced in function _ngx_http_lua_upstream_init

agentzh commented 8 years ago

@itpp16 Because you didn't provide enough info, I can only guess here. This error message means two possibilities usually:

  1. You didn't compile the ngx_http_lua module as a static module into your nginx binary while ngx_http_lua_upstream_module depends on it, or
  2. You did compile the ngx_http_lua module as a dynamic module but you did not compile ngx_http_lua_upstream_module as a dynamic module at the same time (which is required here). The ngx_http_lua_upstream_module does not support building as a dynamic module (yet) BTW.
itpp16 commented 8 years ago

Everything is build as static, nothing new other then the new 1.9.12 layout and "--add-module=" as before.

agentzh commented 8 years ago

@itpp16 It cannot be. The _ngx_http_lua_get_request symbol is from ngx_http_lua_module and apparently your linker cannot find it due to the lack of ngx_http_lua_module. The same applies to _ngx_http_lua_add_package_preload.

itpp16 commented 8 years ago

and confirmed, all openresty modules work when using the previous (lua-nginx-module) config file