[Prev][Next][Index][Thread]
Linker errs with finding stderr
Following up on my own post ....
> Which brings me to another problem, when I'm building the oskit image I
> link like this:
>
> -loskit_startup -loskit_clientos -loskit_fsnamespace \
> -loskit_memfs -loskit_dev -loskit_kern -loskit_lmm -loskit_c -loskit_posix \
> $(OBJDIR)/lib/crtn.o -loskit_freebsd_c -loskit_com
>
> This works well except for two linker errors:
>
> /../../src/classfil.c:386: undefined reference to `stderr'
>
> the other can't find
>
> undefined reference to `__assert_fail'
>
> I can easily turn off the usage of assert, but what should I be linking
> with to get stderr? Or can I assign stderr to stdout?
This kind of error happens when you forget to update your include
directories to point the oskit when compiling, when shifting Make files
around I forgot to add things like:
CFLAGS += -I/usr/local/include/oskit/freebsd -I$(INCLUDEDIR)
-I/usr/local/include/oskit -I/usr/local/include/oskit/c
to include the correct headers.
John
References: