🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #26200

Re: LSC and printf

#26200
From: leonardr
Date: Wed, 09 Mar 1988 15:50
32 lines
1794 bytes
gonter@leadsv.UUCP(C. Gonter) writes in comp.sys.mac

>    I guess I am missing something in LightSpeed C. The following program
>compiles, but dies on link...... I guess I'm alittle green:
>
>	#include "stdio.h"
>	main()
>	{
>	   int i;
>
>	   i = 1;
>	   while( i<=5 ) {
>	      printf("%d\n",i);   /* can't find printf at link */
>	      i= i + 1;
>	   }
>	}
	With Lightspeed C not only do you have to do use the #include stdio.h
but you also have to include in your project the stdio library.  The library
is where all the support for non-Maclike I/O is handled.  


+---------------------------------+-----------------------------------+
+                                 +  Any thing I say may be taken as  +
+   Leonard Rosenthol             +  fact, then again you might decide+
+   President, LazerWare, inc.    +  that it really isn't, so you     +
+                                 +  never know, do you??             +
+   leonardr@uxe.cso.uiuc.edu     +                                   +
+   GEnie:  MACgician             +                                   +
+   Delphi: MACgician             +                                   +
+                                 +                                   +
+---------------------------------+-----------------------------------+
Technical Details
Message-ID: <46100108@uxe.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!pacbell!att-ih!ihnp4!inuxc!iuvax!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxe.cso.uiuc.edu!leonardr
References: <2377@leadsv.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!pacbell!att-ih!ihnp4!inuxc!iuvax!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxe.cso.uiuc.edu!leonardr
From: leonardr@uxe.cso.uiuc.edu
Newsgroups: comp.sys.mac
Subject: Re: LSC and printf
Message-ID: <46100108@uxe.cso.uiuc.edu>
Date: 9 Mar 88 15:50:00 GMT
References: <2377@leadsv.UUCP>
Lines: 32
Nf-ID: #R:leadsv.UUCP:2377:uxe.cso.uiuc.edu:46100108:000:1291
Nf-From: uxe.cso.uiuc.edu!leonardr    Mar  9 09:50:00 1988