JRW
Use the man pages or the XCode doc for further information, but I got
the following program to work
int main (int argc, char * const argv[]) {
// execute "java -version"
return execlp("java", "My Java Program", "-version", NULL);
}
also the following works, but you need to specify the full path:
return execl("/usr/bin/java", "My Java Program", "-version", NULL);
Im noy very knowledgable about c, but I got these to successfully run
in Xcode. Hope this helps you.
Cheers
zsquirrel
zombie.squirrel - 13 Jan 2006 00:21 GMT
Oh, I probably should have said that "execl" and "execlp" are in the
Standard C library, no need to include anythingh as fair as I could
tell.
John Walsh - 13 Jan 2006 19:48 GMT
zsquirrel,
Thanks for the post. That's what I was looking for.
Substituted exec for open.
Compiles.
Same link error in CodeWarrior as before.
Undefined symbol: '_exec'
It's something basic I'm missing. Don't know enough about CW to fix it.
I'll post to the CodeWarrior group. See what they say.
Cheers,
JRW
> JRW
>
[quoted text clipped - 17 lines]
> Cheers
> zsquirrel