LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-06-2005, 02:01 AM   #1
cherupop
LQ Newbie
 
Registered: Jun 2005
Posts: 9

Rep: Reputation: 0
Question 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
 
Old 07-06-2005, 03:35 AM   #2
hk_linux
Member
 
Registered: Nov 2004
Location: India
Distribution: RedHat, PCQLinux, Fedora
Posts: 95

Rep: Reputation: 15
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.

Last edited by hk_linux; 07-06-2005 at 03:36 AM.
 
Old 07-06-2005, 08:18 AM   #3
cherupop
LQ Newbie
 
Registered: Jun 2005
Posts: 9

Original Poster
Rep: Reputation: 0
C

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
forrtl: severe (47): write to READONLY file, unit 5, file /dev/pts/1 terrence Programming 1 10-01-2005 10:22 PM
gave wrong syntax for tar as tar -cvzf file file.tgz how to recover the file gautham Linux - General 4 04-13-2005 03:15 AM
Is arrangement of file systems will differ if we copy a file from FAT 32 to ext 3 ? anindyanuri Linux - Software 2 02-20-2005 11:39 AM
Yum update complains missing file (broken dep), but file can be located. davidas Linux - Software 0 03-27-2004 09:11 PM
How to play a media file/ video file/mp3 file recorded in harddisk/cd-rom arindam Linux - Newbie 2 09-05-2003 10:31 AM


All times are GMT -5. The time now is 06:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration