j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
I am trying to use the fword and feval functions in the file "kernel/forth.c". I know the header file for these functions are located in "include/libopenbios/bindings.h". I used this code to include the bindings.h file:
#include "libopenbios/bindings.h"
For some reason, I still see these errors:
Building OpenBIOS for x86 Building...error: HOSTCC host/kernel/bootstrap.o HOSTCC host/kernel/dict.o HOSTCC host/kernel/primitives.o HOSTCC host/kernel/stack.o HOSTCC forthstrap host/kernel/primitives.o: In function `setupLocalDictionary': /home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1035: undefined reference to `_fword' /home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1037: undefined reference to `_fword' /home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1044: undefined reference to `feval' /home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1045: undefined reference to `feval' host/kernel/primitives.o: In function `loadLocalVariable': /home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1072: undefined reference to `feval' collect2: ld returned 1 exit status make[1]: *** [forthstrap] Error 1 make[1]: Leaving directory `/home/user/Development/openbios-devel/obj-x86' make: *** [build] Error 1
This is a simple function someone could use as an example to be used in the file forth.c
static void test(void) { feval("banner"); }
Anyone know what I am doing wrong or how to solve this problem?
On Thu, Aug 19, 2010 at 4:52 PM, Programmingkid programmingkidx@gmail.com wrote:
I am trying to use the fword and feval functions in the file "kernel/forth.c". I know the header file for these functions are located in "include/libopenbios/bindings.h". I used this code to include the bindings.h file:
#include "libopenbios/bindings.h"
For some reason, I still see these errors:
Building OpenBIOS for x86 Building...error: HOSTCC host/kernel/bootstrap.o HOSTCC host/kernel/dict.o HOSTCC host/kernel/primitives.o HOSTCC host/kernel/stack.o HOSTCC forthstrap host/kernel/primitives.o: In function `setupLocalDictionary': /home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1035: undefined reference to `_fword' /home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1037: undefined reference to `_fword' /home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1044: undefined reference to `feval' /home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1045: undefined reference to `feval' host/kernel/primitives.o: In function `loadLocalVariable': /home/user/Development/openbios-devel/obj-x86/../kernel/forth.c:1072: undefined reference to `feval' collect2: ld returned 1 exit status make[1]: *** [forthstrap] Error 1 make[1]: Leaving directory `/home/user/Development/openbios-devel/obj-x86' make: *** [build] Error 1
This is a simple function someone could use as an example to be used in the file forth.c
static void test(void) { feval("banner"); }
Anyone know what I am doing wrong or how to solve this problem?
You are using the bootstrap compiler, which has only very limited set of basic Forth words defined and actually even some of those will not work during bootstrap time.
Full set of words like 'feval' is available when the library compiled by bootstrap compiler is loaded into non-bootstrap kernel. Your example should compile in arch/x86/openbios.c or arch/unix/unix.c.