delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/10/22/17:19:06

From: "A. Sinan Unur" <asu1 AT cornell DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: HELP!! Please!
Date: 22 Oct 2001 21:05:55 GMT
Organization: Cornell University
Lines: 28
Sender: asu1 AT cornell DOT invalid (on 128.253.251.163)
Message-ID: <Xns9142ADD809B79ASINANUNUR@132.236.56.8>
References: <3BD478A5 DOT 80002 AT earthlink DOT net>
NNTP-Posting-Host: 128.253.251.163
X-Trace: news01.cit.cornell.edu 1003784755 13876 128.253.251.163 (22 Oct 2001 21:05:55 GMT)
X-Complaints-To: usenet AT news01 DOT cit DOT cornell DOT edu
NNTP-Posting-Date: 22 Oct 2001 21:05:55 GMT
User-Agent: Xnews/4.06.22
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Micah J. Kimbrough" <sciencecenter AT earthlink DOT net> wrote in 
news:3BD478A5 DOT 80002 AT earthlink DOT net:

> Hello,
>      I am programing a batch file to compile and link a project I am 
> working on. I am using a ms-dos box on Windows 98. I start off compiling 
> the project with something like c:\djcpp\bin\gcc.exe -c file.c and it 
> goes through each file with no errors or warnings. The last line I have 
> does the linking. I have c:\djcpp\bin\ld.exe -o file.exe file.o file.o 
> file.o ... etc. I have noticed that is reads only half the line and ends 
> in errors. Is there a way to get it to read the whole line and finish 
> the linking? Please help.

I strongly suggest you learn using makefiles. Using Bash would also help.

In the short term, you can shorten command lines by not using the full path 
of excutables. So, instead of c:\djgpp\bin\gcc, use gcc.

Also, instead of calling ld, let gcc do the work when you do 
gcc file1.o file2.o file3.o -o prog.exe -llib1 -llib2.

However, learning to use makefiles is your best bet.


-- 
--------------------------------
A. Sinan Unur
http://www.unur.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019