Re: Compiling: Whats the trick?

2006-06-02 Thread Erik Wikström

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


Re: Compiling: Whats the trick?

2006-06-02 Thread Danial Thom


--- Simon 'corecode' Schubert
[EMAIL PROTECTED] wrote:

 On 02.06.2006, at 01:32, Danial Thom wrote:
  except it barfs pretty badly in DFLY. What's
 the
  trick?
 
 just do it[tm]?  works perfectly here. 
 besides, your error report 
 lacks major information, but I guess you know
 that already.
 
 oh, of course except if you mean the return
 value of ./hello_world.  
 that's a programming error then (no
 return/exit()).

I scaled the code to a minimum. It seems my disk
was made by copying a disk and I guess some of
the links didn't get set up right. The original
disk works fine, even with the bad code.

Thanks

DT

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: Compiling: Whats the trick?

2006-06-01 Thread joerg
On Thu, Jun 01, 2006 at 04:32:41PM -0700, Danial Thom wrote:
 Ok, since the beginning of time, the following
 has worked in every known unix:

*snip*

and works on the pkgsrc build machine. So what is do you expect from us?

Joerg


Re: Compiling: Whats the trick?

2006-06-01 Thread Simon 'corecode' Schubert

On 02.06.2006, at 01:32, Danial Thom wrote:

except it barfs pretty badly in DFLY. What's the
trick?


just do it[tm]?  works perfectly here.  besides, your error report 
lacks major information, but I guess you know that already.


oh, of course except if you mean the return value of ./hello_world.  
that's a programming error then (no return/exit()).


cheers
  simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \


PGP.sig
Description: This is a digitally signed message part