止まる - Mona OS で ゴー?
drv_stdc.c:10: error: redefinition of typedef 'GO_FILE' ../include/stdio.h:17: error: previous declaration of 'GO_FILE' was here
まずはコードを見てみる。
drv_std.c
#include <stdio.h> /* fopen, fclose, fread, fwrite, fseek, ftell, NULL */ #include <stdlib.h> /* exit */ typedef unsigned char UCHAR; typedef struct GO_STR_FILE { UCHAR *p0, *p1, *p; int dummy; } GO_FILE;
これは明らかに Mona の stdio を要求されている。
rules.mak を変更して include path から ../include を外してみた。
abort.c:7: warning: implicit declaration of function `GOL_sysabort' abort.c:7: error: `GO_TERM_ABORT' undeclared (first use in this function)
あちらを立てるとこちらが立たない。
include/go_lib.h にGO_TERM_ABORTの定義がある。
mona の include path を優先するようにしてみるか。
だめだな vprintf.c で GO_FILE を参照していて ../include/stdio.h が include される必要があるみたい。
整理しよう
- drv_stdc/drv_stdc.c では ../include/stdio.h を include したくない
- go_lib/abort.c では ../include/stdio.h を経由して go_lib.h を include したい
- go_lib/vprintf.c では ../include/stdio.h を include したい
仮説
- drv_stdc と go_lib でビルド方法を変える必要がある
- ../include/stdio.h を GO 移植者が変更する必要がある
- 根本的に何か違う
もう少し関連情報を集めた方が良いかもしれない。
id:h0shuさんはそんなことをせずにビルドされているみたいなのだけど、環境の違いかしら。