Mail Archives: djgpp/1997/01/11/21:30:21
Mark Penacho wrote:
>
> what I am having trouble with, is coming up with a linker script file, that
> does the equivalent to
> gcc -o myprog.exe part1.o part2.o part3.o part4.o......part30.o -lm
> but lets me specify all the part files in a linker file (the above command
> line is too long).
Hehe - you haven't looked deeply enough into DJGPP. :) It fully
supports command lines longer than 126 characters via a special
command-line passing format. This only works between DJGPP v2.01
programs, however. So, you have a couple of options:
- Use GNU Make (v2gnu/mak375b.zip) to compile your program via a
makefile. This is the option I recommend; I'll send you a sample
makefile if you like.
- Use RHIDE (v2apps/rhide10b.zip) to build a project with all the
required files and let it do the work. (See Robert Hoehne's home page
at <http://www.tu-chemnitz.de/~rho/rhide.html> for the latest updates.)
- Write a mini-program to invoke gcc with the names of all the required
files. Since this is roughly equivalent to a poor man's Mske, I don't
recommend it. but it will work.
DJGPP also supports a "link" file type of command-line argument. If you
specify @<file> on the command line, it takes the contents of the
specified file and adds them to the command line. So, if you put the
names of all your object files into a file called 'myprog.lnk', you can
compile them all with this command:
gcc -o myprog.exe @myprog.lnk
The final option, of course, is to just use wildcards, i.e.:
gcc -o myprog.exe *.o
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com |
| Descent 2: The Infinite Abyss - The greatest Internet game of all |
| time just got better! This time, you're going all the way down...|
---------------------------------------------------------------------
- Raw text -