I used “spawnv()” as shown in Watcom 10.6 Helpviewer:
char *arg_list[] = { “myprog”, “ARG1”, “ARG2”, NULL };
spawnv( P_WAIT, “myprog”, arg_list );
Why do I get error code:
E473: (col 15) function argument(s) do not match those in prototype
when compiling with Watcom 10.6?
I could not reproduce the problem, make sure you have the
latest patch for Watcom 10.6.
“Horst Schneider” <horst.schneider@student.uni-siegen.de> wrote in message
news:3A5584A6.BB4B3799@student.uni-siegen.de…
I used “spawnv()” as shown in Watcom 10.6 Helpviewer:
char *arg_list[] = { “myprog”, “ARG1”, “ARG2”, NULL };
spawnv( P_WAIT, “myprog”, arg_list );
Why do I get error code:
E473: (col 15) function argument(s) do not match those in prototype
when compiling with Watcom 10.6?
Thanks David,
in fact I’m using C++. I tryed as follows and it worked:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <process.h>
#include <errno.h>
void main()
{
int pid;
const char *const arg_list[] = { “myprog”, “ARG1”, “ARG2”, NULL };
pid = spawnv( P_WAIT, “myprog”, arg_list );
printf(“pid is %d, errno is %d\n”, pid, errno );
}
Horst
David Gibbs wrote:
David Gibbs <> dagibbs@qnx.com> > wrote:
It was just mentioned to me that the (col 15) in the error suggests
you are using C++ rather than C. C++ is MUCH pickier about function
parameters than C, you may have to add some const definitions to
parameters to make it happy. (Assuming you do have the appropriate
headers as well.)-David
Horst Schneider <> horst.schneider@student.uni-siegen.de> > wrote:
I used “spawnv()” as shown in Watcom 10.6 Helpviewer:
char *arg_list[] = { “myprog”, “ARG1”, “ARG2”, NULL };
spawnv( P_WAIT, “myprog”, arg_list );
Why do I get error code:
E473: (col 15) function argument(s) do not match those in prototype
when compiling with Watcom 10.6?Have you included the appropriate header files before calling it?
The following program compiled & worked fine when compiled against
versions 10.5, and 10.6, and latest patch of 10.6.#include <stdio.h
#include <stdlib.h
#include <unistd.h
#include <process.h
#include <errno.hvoid main()
{
int pid;char *arg_list[] = { “myprog”, “ARG1”, “ARG2”, NULL };
pid = spawnv( P_WAIT, “myprog”, arg_list );
printf(“pid is %d, errno is %d\n”, pid, errno );
}-David
QNX Training Services
dagibbs@qnx.com–
QNX Training Services
dagibbs@qnx.com
Horst Schneider <horst.schneider@student.uni-siegen.de> wrote:
I used “spawnv()” as shown in Watcom 10.6 Helpviewer:
char *arg_list[] = { “myprog”, “ARG1”, “ARG2”, NULL };
spawnv( P_WAIT, “myprog”, arg_list );
Why do I get error code:
E473: (col 15) function argument(s) do not match those in prototype
when compiling with Watcom 10.6?
Have you included the appropriate header files before calling it?
The following program compiled & worked fine when compiled against
versions 10.5, and 10.6, and latest patch of 10.6.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <process.h>
#include <errno.h>
void main()
{
int pid;
char *arg_list[] = { “myprog”, “ARG1”, “ARG2”, NULL };
pid = spawnv( P_WAIT, “myprog”, arg_list );
printf(“pid is %d, errno is %d\n”, pid, errno );
}
-David
QNX Training Services
dagibbs@qnx.com
David Gibbs <dagibbs@qnx.com> wrote:
It was just mentioned to me that the (col 15) in the error suggests
you are using C++ rather than C. C++ is MUCH pickier about function
parameters than C, you may have to add some const definitions to
parameters to make it happy. (Assuming you do have the appropriate
headers as well.)
-David
Horst Schneider <> horst.schneider@student.uni-siegen.de> > wrote:
I used “spawnv()” as shown in Watcom 10.6 Helpviewer:
char *arg_list[] = { “myprog”, “ARG1”, “ARG2”, NULL };
spawnv( P_WAIT, “myprog”, arg_list );
Why do I get error code:
E473: (col 15) function argument(s) do not match those in prototype
when compiling with Watcom 10.6?Have you included the appropriate header files before calling it?
The following program compiled & worked fine when compiled against
versions 10.5, and 10.6, and latest patch of 10.6.#include <stdio.h
#include <stdlib.h
#include <unistd.h
#include <process.h
#include <errno.hvoid main()
{
int pid;char *arg_list[] = { “myprog”, “ARG1”, “ARG2”, NULL };
pid = spawnv( P_WAIT, “myprog”, arg_list );
printf(“pid is %d, errno is %d\n”, pid, errno );
}-David
QNX Training Services
dagibbs@qnx.com
–
QNX Training Services
dagibbs@qnx.com