# Adding an static library to a module

**URL:** <https://www.ruby-forum.com/t/adding-an-static-library-to-a-module/208689>\
**Category:** NGINX\
**Created:** [June 24, 2011, 12:15pm UTC](https://www.ruby-forum.com/t/adding-an-static-library-to-a-module/208689 "2011-06-24T12:15:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [June 24, 2011, 12:15pm UTC](https://www.ruby-forum.com/t/adding-an-static-library-to-a-module/208689/1 "2011-06-24T12:15:27Z")

</div>

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. if any know the solution plz reply .

or

i am getting “undefined reference” error to solve it, i want to add an  
library libxxx.a

Thanks and regards  
pavan

Posted at Nginx Forum:

> **[adding an static library to a module](https://forum.nginx.org/read.php?2,209603,209603#msg-209603)**
>
> 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. if any know the solution plz reply . or i am getting "undefined reference" error to solve...

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 24, 2011, 1:46pm UTC](https://www.ruby-forum.com/t/adding-an-static-library-to-a-module/208689/2 "2011-06-24T13:46:23Z")

</div>

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.

Posted at Nginx Forum:

> **[Re: adding an static library to a module](https://forum.nginx.org/read.php?2,209603,209627#msg-209627)**
>
> 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. if any know the solution plz reply . or i am getting "undefined reference" error to solve...

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 24, 2011, 3:39pm UTC](https://www.ruby-forum.com/t/adding-an-static-library-to-a-module/208689/3 "2011-06-24T15:39:28Z")

</div>

Hello!

On Fri, Jun 24, 2011 at 07:46:01AM -0400, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 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 D.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 27, 2011, 6:47am UTC](https://www.ruby-forum.com/t/adding-an-static-library-to-a-module/208689/4 "2011-06-27T06:47:21Z")

</div>

HI  
Thanks alot  
it works.

Thanks and regards  
pavan

Posted at Nginx Forum:

> **[Re: adding an static library to a module](https://forum.nginx.org/read.php?2,209603,210327#msg-210327)**
>
> 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. if any know the solution plz reply . or i am getting "undefined reference" error to solve...
