# While building own nginx module error to find user defined header file

**URL:** <https://www.ruby-forum.com/t/while-building-own-nginx-module-error-to-find-user-defined-header-file/244952>\
**Category:** NGINX\
**Created:** [July 18, 2016, 8:59am UTC](https://www.ruby-forum.com/t/while-building-own-nginx-module-error-to-find-user-defined-header-file/244952 "2016-07-18T08:59:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [July 18, 2016, 8:59am UTC](https://www.ruby-forum.com/t/while-building-own-nginx-module-error-to-find-user-defined-header-file/244952/1 "2016-07-18T08:59:26Z")

</div>

Hi All,

I have written my own nginx module and i have my user defined header  
files  
but while building i am getting error header file not found.

my module will act as a filter.

Please help me.

Regards,  
Pankaj

---

<div class="post-metadata">

**Author:** ![Pankaj\_Chaudhary](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f04885/32.png) [@Pankaj\_Chaudhary](https://www.ruby-forum.com/u/Pankaj_Chaudhary)\
**Post date:** [July 18, 2016, 3:09pm UTC](https://www.ruby-forum.com/t/while-building-own-nginx-module-error-to-find-user-defined-header-file/244952/2 "2016-07-18T15:09:47Z")

</div>

Hello!

On Mon, Jul 18, 2016 at 12:28:34PM +0530, Pankaj Chaudhary wrote:

> I have written my own nginx module and i have my user defined header files  
> but while building i am getting error header file not found.

If you are using header files in your module, you have to add your  
module directory to the list of include paths.

Assuming you are using auto/module script to configure your  
module, you should do something like this in your module ./config  
script:

ngx\_module\_type=HTTP\_AUX\_FILTER  
ngx\_module\_name=ngx\_http\_example\_filter\_module  
ngx\_module\_incs=$ngx\_addon\_dir  
ngx\_module\_deps=  
ngx\_module\_srcs=$ngx\_addon\_dir/ngx\_http\_example\_filter\_module.c  
ngx\_module\_libs=

. auto/module

–  
Maxim D.

> **[nginx](http://nginx.org/)**

---

<div class="post-metadata">

**Author:** ![Pankaj\_Chaudhary](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f04885/32.png) [@Pankaj\_Chaudhary](https://www.ruby-forum.com/u/Pankaj_Chaudhary)\
**Post date:** [July 19, 2016, 11:44am UTC](https://www.ruby-forum.com/t/while-building-own-nginx-module-error-to-find-user-defined-header-file/244952/3 "2016-07-19T11:44:55Z")

</div>

Hi ,  
Thank you,

after using this script also i am getting same error.  
I have makefile which provide other header file path and third party lib  
path.  
I have structure like this  
module\_folder/  
1.module.cpp  
2.config  
3.Makefile

and having sub parent folder which contain other dependency code.

so please let me know what i should do.

---

<div class="post-metadata">

**Author:** ![Pankaj\_Chaudhary](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f04885/32.png) [@Pankaj\_Chaudhary](https://www.ruby-forum.com/u/Pankaj_Chaudhary)\
**Post date:** [July 20, 2016, 2:30pm UTC](https://www.ruby-forum.com/t/while-building-own-nginx-module-error-to-find-user-defined-header-file/244952/4 "2016-07-20T14:30:09Z")

</div>

I have makefile which provide other header file path and third party lib  
path.  
I have structure like this  
module\_folder/  
1.module.cpp  
2.config  
3.Makefile

and having sub parent folder which contain other dependency code.

so please let me know what i should do

On Tue, Jul 19, 2016 at 3:14 PM, Pankaj Chaudhary  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
