Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-02-2003, 02:22 PM   #1
LQ Newbie
Registered: Oct 2003
Posts: 2

Rep: Reputation: 0
problems with lilo.conf and compiling c programs

Distrubtion :Mandrake 8.1

First question:
I have edited my lilo.conf so that Linux boots after 10 seconds. Yet, Linux does not boot automatically after 10 seconds and I have to type in linux to boot it.

Compiling C programs:
Wrote a Hello World "C" program and tried compiling it with:
gcc hello.c
Then typed in a.out. But I just cannot see any output. Do I have to set any variables to see the output.

Here's the C program:

#include <stdio.h>
int main(){
printf("Hello World");

Old 11-02-2003, 02:43 PM   #2
Registered: Oct 2003
Distribution: Slackware
Posts: 112

Rep: Reputation: 15
1. lilo - you probably have a prompt line but no timeout line in your /etc/lilo.conf file. Add a line at the top of the file:

timeout = nnn

Where nnn is the number of 10ths of a second lilo should wait for automatically booting, i.e.

timeout = 300

would wait for 30 seconds. The other option is to remove the prompt line.

As for the C program. If your PATH environment variable does not contain the current directory or ., then programs in your current directory won't be found. Try './a.out' instead, or add . to your path, as in:

export PATH=.:$PATH
Old 11-02-2003, 03:05 PM   #3
Registered: Aug 2002
Posts: 17,825

Rep: Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401Reputation: 2401
Do you have a default line in your lilo.conf?


Are there any errors when you attempt to execute the program, like command not found? I assume it compiles without errors?
Old 11-02-2003, 04:16 PM   #4
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,683

Rep: Reputation: 219Reputation: 219Reputation: 219
printf("Hello World\n");
Try to modify the line this way. Without \n, the text goes to the buffer, \n forces it to be printed. Program exit should do the same, but different things happen...

The command to run the program after you compile it is


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
Problems compiling sigc++ programs siminone Programming 4 10-24-2004 07:31 PM
Problems with RedHat 9 LILO.conf Rudyzplace Linux - Software 0 08-31-2004 03:02 PM
lilo.conf and lilo.conf.anaconda difference blackzone Linux - General 1 07-06-2004 04:15 AM
Have anyone experimented problems compiling programs in rh9? mkaman Red Hat 2 10-31-2003 11:41 AM
lilo.conf and grub.conf no read access shanenin Linux - Software 1 10-02-2003 04:53 PM > Forums > Linux Forums > Linux - Newbie

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

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