LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   autolog file (http://www.linuxquestions.org/questions/programming-9/autolog-file-340474/)

cherupop 07-06-2005 03:01 AM

autolog file
 
Hi guys
I'm trying to follow a tutorial which teach how to install and run an emulator in gentoo, I'm actually running it in Fedora which is doing pretty good.

at some point the guy from the tutorial ask me to type a little text file call autolog.c including the following

main ()
{
execlp( "login", "login", "-f", "mame", 0);
}

and later he ask me to run this
gcc -o autolog autolog.c
in order to compile it

when I try to do that i get an error in my terminal like this

[mame@localhost ~]$ gcc -o autolog autolog.c
autolog.c: In function ‘main’:
autolog.c:3: warning: incompatible implicit declaration of built-in function ‘execlp’

since I don't know anything about c, I have no idea what the terminal is trying to tell me, if somebody can point me out in my error and tell me how can I change it in order to be able to compile it correctly.

I will really appreciate

cherupop

hk_linux 07-06-2005 04:35 AM

Try including the unistd header file as follows and then compile the code.

Code:

#include <unistd.h>
main ()
{
execlp( "login", "login", "-f", "mame", 0);
}

HTH.

cherupop 07-06-2005 09:18 AM

C
 
Ok
I'll try that to see what happens
thanks
cherupop


All times are GMT -5. The time now is 08:10 AM.