[comp.lang.c] Need help moving from DOS to Unix

richard@calvin.EE.CORNELL.EDU (Richard Brittain) (09/02/89)

Hello netland,
				 sorry if this is a rather vague question, but my problem is
that I learned C on a pc using Turbo-C, and now I'm trying to write in C
on a unix box (BSD and Ultrix) but nothing works!!!!!.  All of my pc source
gives multitudinous errors under unix, and I'm not talking about obvious
stuff like DOS specific functions, but things like header files in different
places, or not there at all.  Function prototypes seem to give cc a fit, and
I also get a lot of miscellaneous errors and warnings like "warning: old
fashioned initialization" that I cannot make sense of.  I'd be really 
grateful if anyone could give any general rules of thumb for converting
between the two environments.
			Thanks in advance

Richard Brittain,                   School of Elect. Eng.,  Upson Hall   
                                    Cornell University, Ithaca, NY 14853
ARPA: richard@calvin.spp.cornell.edu	
UUCP: {uunet,uw-beaver,rochester,cmcl2}!cornell!calvin!richard

cpcahil@virtech.UUCP (Conor P. Cahill) (09/02/89)

In article <1287@calvin.EE.CORNELL.EDU>, richard@calvin.EE.CORNELL.EDU (Richard Brittain) writes:
> Hello netland,
> 	 sorry if this is a rather vague question, but my problem is
> that I learned C on a pc using Turbo-C, and now I'm trying to write in C
> on a unix box (BSD and Ultrix) but nothing works!!!!!.  All of my pc source
> gives multitudinous errors under unix, and I'm not talking about obvious
> stuff like DOS specific functions, but things like header files in different
> places, or not there at all.  Function prototypes seem to give cc a fit, and
> I also get a lot of miscellaneous errors and warnings like "warning: old
> fashioned initialization" that I cannot make sense of.  I'd be really 
> grateful if anyone could give any general rules of thumb for converting
> between the two environments.

My *guess* would be that the turbo-c compiler is much more ANSI compliant
than the older compilers used on your BSD/Ultrix systems.  If you really
need to be portable accross these environments I would develop the software
on the BSD/Ultrix system and then port it to turbo-c. This gets you writing
the software at the "least common denominator" level of compiler.  An ANSI
compiler should not have too much trouble compiling software generated
under an older (K&R 1st Ed) compiler since that was part of thier mandate.



-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+