Compiling: Whats the trick?

Erik Wikström erik-wikstrom at telia.com
Fri Jun 2 01:29:00 PDT 2006


On 2006-06-02 01:32, Danial Thom wrote:
Ok, since the beginning of time, the following
has worked in every known unix:
/* hello_world.c */

#include "/usr/include/stdio.h"

main()
{
        printf("hello world\n");
}
cc -o hello_world hello_world.c 

except it barfs pretty badly in DFLY. What's the
trick?
Can start of by including <stdio.h> instead of "/usr/include/stdio.h", 
then add "int" in front of "main", add "return 0;" after the printf and 
we have something looking like a correct C program.

If you still can't compile the application I would suggest that you re- 
install your system from scratch since, in that case, you've messed upp 
your system real good.

Erik Wikström
--
 "I have always wished for my computer to be as easy to use as my
 telephone; my wish has come true because I can no longer figure
 out how to use my telephone" -- Bjarne Stroustrup




More information about the Users mailing list