From: "Sean Middleditch" Newsgroups: comp.os.msdos.djgpp References: <3 DOT 0 DOT 5 DOT 32 DOT 19990604133755 DOT 007ced70 AT jafar DOT uqar DOT uquebec DOT ca> <01beaf0d$690c4500$fc4484ce AT sub> Subject: Re: command line too short Date: Sat, 5 Jun 1999 10:14:58 -0400 Lines: 63 Organization: AwesomePlay Productions X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: usr05-095.provide.net Message-ID: <375933f4.0@news.provide.net> X-Trace: 5 Jun 1999 10:28:04 -0400, usr05-095.provide.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Make would be the best option, no? Sean Middleditch 0/0 wrote in message news:01beaf0d$690c4500$fc4484ce AT sub... > > > Karel Uhlir wrote in article > <3 DOT 0 DOT 5 DOT 32 DOT 19990604133755 DOT 007ced70 AT jafar DOT uqar DOT uquebec DOT ca>... > > > > > >I'm assuming that my command line has gotten too long and the "-lalleg" > > >has been chopped down to "-la". Anyone know how I can fix this? > Thanks. > > > > > >Mark > > > > > > > > > > I had a similar problem with the length of the command-line in a DOS > > window. This is what you mean isn't it? The DOS batch file seems to have > > the same limitations as the DOS command line. > > > > I solved this by using the Rhide environment (see DJGPP web site for > > download) and creating a project with all the files I want compiled at > the > > same time to create the .exe file. You can add the compile options by > using > > the Options menu. > > > > Hope this will help. > > > > Karel > > > > Another good solution is to create library modules out of your code, and > then compile them with your main program. > > Just convert your files to objects by doing this.... > > gcc -c file1.cpp file2.cpp > > This will generate `file1.o' and `file2.o', and more if you specify more > files. > You can then use `ar' to create an library/archive file, like this... > > ar rvs lib1.a file1.o file2.o > > it generates a `lib1.a' file. > For convenence you can delete the object files after they are in the > library by simply using... > > del *.o > > And finaly to compile your main program code with the library you created, > you do this... > > gcc main.cpp lib1.a -o test.exe > > and that should do it. >