httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Vissault <frederic.vissa...@libertysurf.fr>
Subject module coding : compilation problem
Date Sat, 12 Apr 2003 17:18:49 GMT
hi all,

i'm working with Apache 1.3.x and VC++ compiler and my problem is

when i write this in my module code (my_module.h) :

...
static const char* action_cmd(cmd_parms *cmd, void *mconfig, char *word1);

const command_rec cmds[] =
{
  {
    "CommandName",                /* directive name */
    action_cmd,                   /* config action routine */         ---->
line 45
    NULL,                         /* argument to include in call */
    OR_LIMIT,                     /* where available */               ---->
line 47
    TAKE1,                        /* arguments */                     ---->
line 48
    "CommandName argument : path" /* directive description */
  },
  {NULL}
};
...

i have this three errors during compilation :

...\my_module.h(45) : error C2440: 'initializing' : cannot convert from ''
to 'const char *(__cdecl *)(void)'
        None of the functions with this name in scope match the target type
...\my_module.h(47) : error C2440: 'initializing' : cannot convert from
'const int' to 'void *'
        Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
...\my_module.h(48) : error C2440: 'initializing' : cannot convert from
'enum cmd_how' to 'void *'
        Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast

so, i have read all Apache documentation about initializing directives and i
don't understand what is this problem.
and i haven't errors during compilation of handler_rec struct of my module.

Could you help me to resolve this problem?

thanks in advance for your ideas!
fred


Mime
View raw message