Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
How can I modulize (is this a word?) my kernel? I have reached about 10-12 different C files and apparently "ld" can't link that many. I am compiling under windows xp.
1: Don't use djgpp
2: link in steps
ld -i -o intermediate1.o file1.o file2.o file3.o
ld -i -o intermediate2.o file4.o file5.o file6.o
ld -i -o intermediate3.o file7.o file8.o file9.o
ld ..... intermediate1.o intermediate2.o intermediate3.o
IIRC, that is
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
I use djgpp and make works fine with much longer command lines than you can get away with in batch files run in cmd.
I still haven't managed to get a cygwin cross compiler working properly. I know, I know - it must be me because the exact instructions on the wiki work for everyone else...
So far, however, no problems with djgpp so the incentive to use Cygwin just isn't there.
t0xic wrote:How can I modulize (is this a word?) my kernel? I have reached about 10-12 different C files and apparently "ld" can't link that many. I am compiling under windows xp.
The wildcard trick does work, and I have been trying to shy away from djgpp as much as possible. I haven't figured out how to use cygwin from batch files (make is too complex for me lol)
Could anyone show me an example of a cygwin batch or make file?
On the other hand, replace your tools by things that aren't limited to humanly reachable limits. I can't configure bochs (./configure, not bochsrc) in Windows because I tend to use too many options.
How can I modulize (is this a word?) my kernel? I have reached about 10-12 different C files and apparently "ld" can't link that many. I am compiling under windows xp.
You might try breaking certain parts into multiple directories:
<inside \project\src\mm\>
gcc -c *.c
cp *.o \project\obj\
<inside \project\src\kernel\>
gcc -c *.c
cp *.o \project\obj\
<inside \project\src\vfs\>
...
..
<inside \project\drivers\...>
...
<final link inside \project\obj>
gcc *.o -o kernel
Last edited by Kevin McGuire on Sat May 26, 2007 5:20 pm, edited 1 time in total.