# Another c file

**URL:** <https://www.ruby-forum.com/t/another-c-file/221537>\
**Category:** NGINX\
**Created:** [July 18, 2012, 8:38pm UTC](https://www.ruby-forum.com/t/another-c-file/221537 "2012-07-18T20:38:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [July 18, 2012, 8:38pm UTC](https://www.ruby-forum.com/t/another-c-file/221537/1 "2012-07-18T20:38:38Z")

</div>

My module uses external c file. How can I link it with ngx?

thanks

Posted at Nginx Forum:

> **[another c file](https://forum.nginx.org/read.php?2,228712,228712#msg-228712)**
>
> My module uses external c file. How can I link it with ngx? thanks

---

<div class="post-metadata">

**Author:** ![munkhabi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/13edae/32.png) [@munkhabi](https://www.ruby-forum.com/u/munkhabi)\
**Post date:** [July 19, 2012, 2:40pm UTC](https://www.ruby-forum.com/t/another-c-file/221537/2 "2012-07-19T14:40:10Z")

</div>

On 18.07.2012 22:38, munkhabi wrote:

> My module uses external c file. How can I link it with ngx?

Add this file to build config for module, e. g.

NGX\_ADDON\_SRCS=“$NGX\_ADDON\_SRCS   
$ngx\_addon\_dir/ngx\_foo\_bar\_module.c   
$ngx\_addon\_dir/some\_extrenal\_file.c”

If this code uses header files, it should be added to NGX\_ADDON\_DEPS

–  
Anton Y.
