[comp.lang.c] Turbo C help needed

840445m@aucs.uucp (Alan McKay) (06/07/90)

Hi folks.  I am writing a program in Turbo C and I need a bit of help.
I originally had the program all in one file and recently split it up
into multiple files.  However, the program has now gotten so big that
the linker runs out of memory, so I have to go it alone from the DOS
prompt without the Turbo-C integrated environment.  I started using
'make' to take care of rebuilding, and I was wondering how I can find
out what command line to use to do a 'default' build.  Wait, let me
rephrase that.  When I use the integrated environment I just use the
default setting (whatever they happen to be).  How can I find out what
command line arguments to pass to tcc and tlink to get these same defaults?
You see, when I compile and link everything, all seems to build fine but
the program crashes horribly.  I doubt very much if it is the program since
I have an exact duplicate source program which is all in one source file.
It compiles and runs great from the TC integrated environment.  The only 
difference besides being in multiple files is that I am no longer using
the integrated environment.  I need to know how to compile and what files
(i.e. obj and lib) to link in with my program.  The only include I use
besides my own is 'stdio.h'.

Thanks very much for your help.  I realise that I have worded this in
a confusing way, but I hope someone out there can understand me.

Actually, while I'm here, I've been having this weird problem with
output (printf).  The problem has occured even when I had the works
all in one file.  To give an example, the line of code
	printf( "Hello World" );
will sometimes yeild something like this:
Hell
 World
I don't understand what is wrong.  The problem seems to be random as it
sometimes changes from printf to printf, for no apparent reason.  I am
still having the problem. 

One final question:  How do I decide which memory model to use??

Thanks all.

-- 
Alan W. McKay          |        "Courage my friend,
840445m@AcadiaU.CA     |              it is not yet too late
840445m@aucs.CA        |                     to make the world a better place."
(902)542-7356 (voice)  |        - Tommy Douglas

sidney@saturn.ucsc.edu (Sidney Markowitz ) (06/07/90)

The answer to your question is on page 40 of the Turbo C User's Guide.
Assuming that you have Turbo C version 2.0. Assuming that you have a
User's Guide. If you don't, try asking someone who has a legal copy,
instead of sending such system specific questions to thousands of
people around the world who are interested in the C language, not
necessarily a particular compiler on a particular machine.

-- sidney <sidney@saturn.ucsc.edu>