DragonFly BSD
DragonFly users List (threaded) for 2006-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Compiling: Whats the trick?

From: Erik Wikström <erik-wikstrom@xxxxxxxxx>
Date: Fri, 02 Jun 2006 10:29:00 +0200

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"

        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

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]