adding an static library to a module

Maxim Dounin mdounin at mdounin.ru
Fri Jun 24 17:39:15 MSD 2011


Hello!

On Fri, Jun 24, 2011 at 07:46:01AM -0400, pavan.anjaneyulu at gmail.com wrote:

> HI,
> my name pavan, presently working on nginx, i want to add an static
> library to an thirdparty module at compile time to module. or to config
> file.  
> How to add an static library (libxx.a ) to an add on module to nginx ?
> if any know the solution plz help me .
> 
> 
> or
> 
> i am getting "undefined reference" error to solve when make is done, if
> to solve the this error i need to add library, but i am not able to add
> library to the module. so can u plz help me how to add an static library
> to  module? i want to add an library libxxx.a to solve this problem
> because the i tested small c application by adding library at compile
> time through command promt.
> like :: cc test.c libxx.a(tested in c program it works) , now i want
> this in nginx.

In file "config" you may add something like this:

CORE_LIBS="$CORE_LIBS -L /path/to/library -lxx"

or

CORE_LIBS="$CORE_LIBS /path/to/library/libxx.a"

You may also want to add the library file to $LINK_DEPS to make 
sure nginx will correctly relink itself on make if library 
changes.

Maxim Dounin



More information about the nginx mailing list