Path: chuka.playstation.co.uk!news From: "Peter Armstrong" Newsgroups: scee.yaroze.freetalk.english Subject: Re: Problem with GCC Date: Wed, 16 May 2001 20:15:50 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 73 Message-ID: <9dujq8$7s61@www.netyaroze-europe.com> References: <01c0dd8f$fb6f2180$6a2e1bd4@pal-s-omnibook> NNTP-Posting-Host: host213-122-29-227.btinternet.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 I also came across the same problem. To shorten the gcc command line you can use wildcards in your makefiles. For example the following would compile using all the object files in the particular directories. all : OBJS = folder01/*.o \ folder02/*.o \ folder03/*.o \ folder04/*.o : gcc $(OBJS) If that's any use, there's more info on wildcards in the make documentation. Regards, Peter "pal" wrote in message news:01c0dd8f$fb6f2180$6a2e1bd4@pal-s-omnibook... > Hi there. I post here rather than to the programming groups because they're > dead, please tell me if I'm wrong. Here's the problem I'm faced with: I > want to link many object files together in order to get an executable. I > use 'make' to get my files together (nothing uncommon here I hope). > > All works well until I need many files. When I want to link too many files, > an alert dialog yells "This program has performed an illegal operation and > will be terminated. (...) The program tried to execute an invalid > instruction. (...)". > > With Djgpp, the same makefile is processed properly. I tried to use Djgpp's > more recent make with my NY stuff but the problem remained. So I think the > troublemaker is Gcc. > > After experimenting a bit, I think that the problem is related to the > number of characters in the gcc command line. When the filenames are > longer, fewer files are need to be listed to cause the crash. The same goes > when options (eg output file name) are added. > > I tried to play with the memory settings for the windowed dos program > execution, but with no success. When the crash has occurred, all Dos > programs may cease to work (sometimes even the simple Dos console crashes) > until reboot. > > Does anybody have an idea for a solution or a workaround? I'm thinking of > building groups of object files (maybe libraries?), but I have no clue how > to do that... > > pal > > > > Misc: I'm using gcc 2.7.2, found on the NY CD, under W95. I need the thing > to work from Windows, not just in pure Dos. > > I've attached a simple example makefile that causes the problem. It's > basically a long list of object files. If just one object file is taken out > of it, it will work. The filexxxx.o's are just dummy object files obtained > by compiling an empty source. > >