コンパイルしようとしている非常に基本的なmain.cプログラムがありますが、単純な外部アセンブリ関数でコンパイルすることはできません。
私が持っているものをお見せしましょう
main.c:
extern void putc(char c);
int main()
{
return (0);
}
ターミナル:
$ bcc -c main.c
main.c:13.21: error: need ')'
main.c:13.24: error: c not in argument list
main.c:13.24: error: need ';'
main.c:13.24: error: need '{'
main.c:13.24: error: bad expression
main.c:15.3: error: bad expression
main.c:15.8: error: need ';'
main.c:16.1: error: need ';'
main.c:17.15: error: compiler bug? - attempting to load non-scalar non-pointer
main.c:eof: error: need '}'
$
更新:
コードを次のように変更した場合
extern void putc(c) char c;
int main();
{
return(0);
}
それから私はちょうど得る
$ bcc -c main.c
main.c:8.11: error: main not in argument list
main.c:10.14: error: compiler bug? - attempting to load non-scalar non-pointer
$