Ik ben bezig om een eigen besturingssysteem te maken, hiervoor moet ik een bibliotheek maken met alle standaard functies volgens ANSI C. Nu is het probleem dat als ik het volgende script uitvoer, gcc het bestand niet kan zien
(btw.. ik weet niet of dit nou in de DevSchuur hoort, maar aangezien het met djgpp in windows wel werkt leek het mij het best om in NOS te posten
)
Alles gaat goed tot ik bij de regel kom waar ik time.c wil compilen, dan geeft de shell de volgende melding:
(Totale output)
Zoals je kunt zien bestaat time.c, maar toch zegt de cli, dat hij niet bestaat
Echt vaag, vooral omdat de andere wel normaal compilen. Als iemand een idee heeft ->
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| build.sh: echo "Building Operating System Library..." echo "Compiling math.c..." gcc -g -Wall -W -O2 -fno-builtin -nostdinc -c -Iinclude -nostdlib math.c echo "Compiling stdio.c..." gcc -g -Wall -W -O2 -fno-builtin -nostdinc -c -Iinclude -nostdlib stdio.c echo "Compiling stdlib.c..." gcc -g -Wall -W -O2 -fno-builtin -nostdinc -c -Iinclude -nostdlib stdlib.c echo "Compiling string.c..." gcc -g -Wall -W -O2 -fno-builtin -nostdinc -c -Iinclude -nostdlib string.c echo "Compiling time.c..." gcc -g -Wall -W -O2 -fno-builtin -nostdinc -c -Iinclude -nostdlib time.c echo "generating library..." ar rcs osc.lib math.o stdio.o stdlib.o string.o time.o echo "cleaning object files..." rm *.o echo "build finished." |
Alles gaat goed tot ik bij de regel kom waar ik time.c wil compilen, dan geeft de shell de volgende melding:
(Totale output)
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| matthias@athena:~/OSCLibrary$ ./build.sh Building Operating System Library... Compiling math.c... Compiling stdio.c... Compiling stdlib.c... Compiling string.c... Compiling time.c... : Onbekend bestand of map gcc: geen invoerbestanden generating library... ar: time.o: Onbekend bestand of map cleaning object files... build finished. matthias@athena:~/OSCLibrary$ ls build.sh include osc.lib stdlib.c string.c~ build.sh~ math.c stdio.c string.c time.c matthias@athena:~/OSCLibrary$ |
Zoals je kunt zien bestaat time.c, maar toch zegt de cli, dat hij niet bestaat
Echt vaag, vooral omdat de andere wel normaal compilen. Als iemand een idee heeft ->