logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Building & Member Downloads View previous topic :: View next topic
Reply to topic   Topic: Can't to compile the new module in xp
Author
frankyue



Joined: 07 Sep 2009
Posts: 2

PostPosted: Mon 07 Sep '09 15:50    Post subject: Can't to compile the new module in xp Reply with quote

I just write and compile a new module in linux .It is run on sucessfully!
Now I need to use the module in xp!
But when I used the command "apxs -c mod_tive.c"to compile it some errors were occur!

Quote:

E:\apache_2.2\bin>apxs.bat -c tive_filter\mod_tive_filter.c
cl /nologo /MD /W3 /O2 /D WIN32 /D _WINDOWS /D NDEBUG -I"E:\apache_2.2\inclu
de" /c /Fotive_filter\mod_tive_filter.lo tive_filter\mod_tive_filter.c
mod_tive_filter.c
tive_filter\mod_tive_filter.c(63) : warning C4013: 'apr_strnatcasecmp' undefined; assuming extern eturning int
tive_filter\mod_tive_filter.c(95) : error C2143: syntax error : missing';' before 'type'
tive_filter\mod_tive_filter.c(106) : error C2065: 'ch' : undeclared identifier
tive_filter\mod_tive_filter.c(106) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
tive_filter\mod_tive_filter.c(106) : warning C4024: 'apr_file_getc' : different types for formal and actual parameter 1
tive_filter\mod_tive_filter.c(118) : error C2109: subscript requires array or pointer type
tive_filter\mod_tive_filter.c(124) : error C2109: subscript requires array or pointer type
tive_filter\mod_tive_filter.c(128) : error C2109: subscript requires array or pointer type
tive_filter\mod_tive_filter.c(145) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
tive_filter\mod_tive_filter.c(145) : warning C4024: 'apr_file_getc' : different types for formal and actual parameter 1
tive_filter\mod_tive_filter.c(152) : error C2109: subscript requires array or pointer type
tive_filter\mod_tive_filter.c(154) : error C2109: subscript requires array or pointer type
tive_filter\mod_tive_filter.c(163) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int '
tive_filter\mod_tive_filter.c(163) : warning C4024: 'apr_file_getc' : different types for formal and actual parameter 1
tive_filter\mod_tive_filter.c(189) : error C2143: syntax error : missing ';' before 'type'
tive_filter\mod_tive_filter.c(194) : warning C4018: '<' : signed/unsigned mismatch
tive_filter\mod_tive_filter.c(218) : error C2065: 'buf' : undeclared identifier
tive_filter\mod_tive_filter.c(218) : error C2109: subscript requires array or pointer type

The first line is warring so I neglect it!

The first error points that I missing ";" before 'type'
Here is the source code at 95 line:
Quote:
char *ch = apr_pcalloc(pool,sizeof *ch);


so I checked but nothing is wrong!

and the second error is depend on the first one("ch" defines on line 95 )

I think I must take a mistake by some steps!Can someone help me? thanks!

Or you can tell me how to create a new apache module and compile in xp!Tell me the detail steps if you can !
Thanks for you help!

frankyue1019@gmail.com
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 07 Sep '09 19:22    Post subject: Reply with quote

well, without seeing anything more than that single line I'm going to think that there's some actionable statement before that declaration and you need to move that declaration up to the top of the code block. GCC allows you to declare anywhere, VC does not.

Code:
void int somefunction()
{
all declarations first

then the code
}
Back to top
frankyue



Joined: 07 Sep 2009
Posts: 2

PostPosted: Wed 09 Sep '09 10:21    Post subject: Reply with quote

Yes,u are right!Thanks!
I can compile it in sucessful!
Back to top


Reply to topic   Topic: Can't to compile the new module in xp View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads