Turbo C help needed

Alan McKay 840445m at aucs.uucp
Thu Jun 7 04:37:39 AEST 1990


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 at AcadiaU.CA     |              it is not yet too late
840445m at aucs.CA        |                     to make the world a better place."
(902)542-7356 (voice)  |        - Tommy Douglas



More information about the Comp.lang.c mailing list