DoctorWkt / acwj

A Compiler Writing Journey
GNU General Public License v3.0
10.43k stars 1.01k forks source link

Compilation error: data.h #44

Closed prince-ao closed 2 years ago

prince-ao commented 2 years ago

This is probably a problem with my system. Starting from 05_Statements I'm getting the error:

data.h:10:9: error: unknown type name ‘FILE’
   10 | extern_ FILE *Infile;                   // Input and output files
      |         ^~~~
data.h:11:9: error: unknown type name ‘FILE’
   11 | extern_ FILE *Outfile;
      |         ^~~~
data.h:13:19: error: ‘TEXTLEN’ undeclared here (not in a function)
   13 | extern_ char Text[TEXTLEN + 1];         // Last identifier scanned
      |                   ^~~~~~~
data.h:14:30: error: ‘NSYMBOLS’ undeclared here (not in a function)
   14 | extern_ struct symtable Gsym[NSYMBOLS]; // Global symbol table

Can anyone point me to the right direction. Thank you.

prince-ao commented 2 years ago

I found the error. Your not supposed to compile headers. 🤦