Testing Libraries... failing linking...
Posted: Wed Jun 13, 2007 5:13 pm
I have built the libk library from vm8086MM on http://my.execpc.com/~geezer/os/index.htm
The library built fine, however, when I try to link against it I get errors such as:
my make file is:
and everything builds fine, just cannot link to the lib ![Sad :(](./images/smilies/icon_sad.gif)
Dunno why, anyone got any knowledge in this?
Thanks,
Rich
The library built fine, however, when I try to link against it I get errors such as:
Code: Select all
main.c:(.text+0x23): undefined reference to `_do_printf'
Code: Select all
CC=gcc
CFLAGS=-Wall -O -W -02 -fstrength-reduce -fomit-frame-pointer -fleading-underscore -fno-stack-protector -finline-functions -nostdinc -fno-builtin -I./include -c -o
LD=ld
LDFLAGS=-nostdlib -Tlink.ld -o
ASM=nasm
ASMFLAGS=-f elf -o
SOURCES=start.asm main.c conio.c
OBJS=start.o main.o conio.o
EXECUTABLE=cnex.sys
LIBS =lib/libk.a
all: $(EXECUTABLE) install clean
$(EXECUTABLE) : $(OBJS)
$(LD) $(LDFLAGS) $(EXECUTABLE) $(OBJS) $(LIBS)
start.o : start.asm
$(ASM) $(ASMFLAGS) start.o start.asm
main.o : main.c
$(CC) $(CFLAGS) main.o main.c
conio.o : conio.c
$(CC) $(CFLAGS) conio.o conio.c
clean :
rm -rf *.o
install :
mdel a:cnex.sys
mcopy cnex.sys a:
![Sad :(](./images/smilies/icon_sad.gif)
Dunno why, anyone got any knowledge in this?
Thanks,
Rich