C 奇怪的makefile生成错误

C 奇怪的makefile生成错误,c,struct,C,Struct,我正在处理这段非常简单的代码,但不知何故,构建错误对我来说非常奇怪。 我在项目中有以下文件:main.c,http_request.h,http_request.c;和一个简单的Makefile 1。http_request.h /* STRUCTURES */ struct http_param { char key[MAX_BUFFER]; char *value; }; struct http_request { int size; s

我正在处理这段非常简单的代码,但不知何故,构建错误对我来说非常奇怪。 我在项目中有以下文件:
main.c
http_request.h
http_request.c
;和一个简单的
Makefile

1。http_request.h

/* STRUCTURES */
struct http_param {
    char    key[MAX_BUFFER];
    char    *value;
};

struct http_request {
    int     size;
    struct  http_param  data[MAX_PARAM];
};

/* FUNCTIONS */
int parse_http_request(apr_pool_t *pool, const char *args, struct http_request *req); /* (A) */
2。http_request.c

#include <http_request.h>
...// something else goes here, it's fine

int 
parse_http_request(apr_pool_t *pool, const char *args, struct http_request *req) /* (B) */
{
此目录包含http\u request.h

然后我构建,它会引发以下错误:

/project/src/http_request.c:14: warning: 'struct http_request' declared inside parameter list
/project/src/http_request.c:14: warning: its scope is only this definition or declaration, which is probably not what you want
/project/src/http_request.c: In function 'parse_http_request':
错误指向
(A)
(B)
,正如我在上面的源代码中提到的那样

有人能帮我找出问题所在吗? 谢谢。

使用

#include "http_request.h"
而不是

#include <http_request.h>
#包括

看到您使用apr\u pool\t,我怀疑您的include路径中也有apache include。apache还提供了一个名为http_request.h的文件,其中包含了一个文件,而不是您现有的文件。

哦,得了吧……我真的很糟糕。我永远也不会知道我的
http_request.h
也和Apache模块提供程序中的冲突。我已经修好了,现在很酷。谢谢你,伙计@xjaphx再学习一次经验,下次您将认识到它。:)当您处理的项目创建util.h和/或config.h时,只需等待调试的喜悦。
#include <http_request.h>