Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
In a case like this, it always helps to say what experience level you have. Have you ever compiled and run a C program before? Is the problem you are having the first time you have had difficulty running a program after a compilation, or is compiling C programs a new experience for you?
It appears that most of your problems could be solved by doing it this way:
$ gcc main.c clear.c -o main
If this doesn't work, you should look into your system defaults for includes and resources -- much effort goes into making the compiler default to reasonable include and library paths with no fuss.
The problem sourcing the file is not starnge, the dot . (or "source") command work only with shell scripts.
For the rest, double check the output of "ldd main" to see if the required libraries are in place. Maybe you compiled them with a different version of glibc or whatever and it can't link to the current one.
That kind of error, when you know that the file is there, is in my experience either due to some broken ldd stuff or due to fs corruption (well besides the obvious possibility, that the file is not really there, but I assume that's not the case). That's why I suggested using ldd, and if that doesn't work I'd suggest to use fsck in that volume.