httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 张 臻博 <>
Subject Re: questions related to compile!
Date Wed, 07 Feb 2007 22:01:20 GMT

>>>How can i include the source file that i made in the Apache server 
>>>  comiplation process, while the module is still built as a DSO by 
>>>  using apxs
>>You would have to declare the structure in a header file, which you 
>>  #include in both your module source code and in the Apache source 
>>  file where you reference it. Then, when you configure httpd, you 
>>can  tell it where your header file lives by passing an environment 
>>  variable, like:
>>CFLAGS="-I/path/to/your/module/source" ./configure ...
>I have checked the manual for configuration. It says:
>    Set C compiler flags you want to use for compilation.
>    Set C/C++ preprocessor flags, e.g. -Iincludedir if you have 
>headers in a nonstandard directory includedir.
>So shall i use CPPFLAGS instead of CFLAGS? Actually i have tried 
>both. Unfortunately, it seems in the apr_poll.h(where i include the 
>header file), it still can not find the header file correctly. What 
>is the problem....?

Here is part of the error information: 
/bin/bash /p/work/Dec2007/zzhang/httpd-2.2.4/srclib/apr/libtool --silent 
--mode=compile gcc -g -O2 -pthread   -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT 
-I/p/work/Dec2007/zzhang/httpd-2.2.4/modules/dtn -I./include 
-I/p/work/Dec2007/zzhang/httpd-2.2.4/srclib/apr/include  -o 
poll/unix/epoll.lo -c poll/unix/epoll.c && touch poll/unix/epoll.lo
In file included from ./include/apr_poll.h:30,

                 from poll/unix/epoll.c:17:
/p/work/Dec2007/zzhang/httpd-2.2.4/modules/dtn/http_dtn.h:20:19: error: 
httpd.h: No such file or directory
/p/work/Dec2007/zzhang/httpd-2.2.4/modules/dtn/http_dtn.h:21:25: error: 
http_config.h: No such file or directory
/p/work/Dec2007/zzhang/httpd-2.2.4/modules/dtn/http_dtn.h:22:23: error: 
http_core.h: No such file or directory
/p/work/Dec2007/zzhang/httpd-2.2.4/modules/dtn/http_dtn.h:23:22: error: 
http_log.h: No such file or directory
/p/work/Dec2007/zzhang/httpd-2.2.4/modules/dtn/http_dtn.h:24:23: error: 
http_main.h: No such file or directory
/p/work/Dec2007/zzhang/httpd-2.2.4/modules/dtn/http_dtn.h:25:27: error: 
http_protocol.h: No such file or directory
/p/work/Dec2007/zzhang/httpd-2.2.4/modules/dtn/http_dtn.h:26:26: error: 
http_request.h: No such file or directory
/p/work/Dec2007/zzhang/httpd-2.2.4/modules/dtn/http_dtn.h:27:25: error: 
util_script.h: No such file or directory
/p/work/Dec2007/zzhang/httpd-2.2.4/modules/dtn/http_dtn.h:28:29: error: 
http_connection.h: No such file or directory

It seems by using CPPFLAGS, the source directory 
/p/work/Dec2007/zzhang/httpd-2.2.4/modules/dtn is scuccessfully in cluded 
for compilation.
Now the error is that in the header file written by me. I used e.g. 
#include "httpd.h"
#include "http_config.h" to include the Apache header file. However, the 
files can not be found... Any idea aobut this?

thanks a lot

与联机的朋友进行交流,请使用  Live Messenger; 

View raw message