1

I am teaching myself C. I have been following the tutorial Here on how to make a text editor using C. I've installed cygwin, and installed the necessary parts based on the tutorial. I got as far as page 2, when I hit a compiler error.

$ make
cc kilo.c -o kilo -Wall -Wextra -pedantic -std=c99
kilo.c: In function ‘enableRawMode’:
kilo.c:33:9: error: variable ‘raw’ has initializer but incomplete type
  struct termois raw = orig_termios;
         ^~~~~~~
kilo.c:33:17: error: storage size of ‘raw’ isn’t known
  struct termois raw = orig_termios;
                 ^~~
kilo.c:33:17: warning: unused variable ‘raw’ [-Wunused-variable]
make: *** [Makefile:2: kilo] Error 1

My code is identical to the code in the tutorial on This Page Because I'm completely new to C I don't completely understand what the problem is, or how to fix it.

I have no idea what I'm doing.

Zenichi
  • 13
  • 2

1 Answers1

0

This is a typo: termois should be termios:

struct termios raw = orig_termios;
lenik
  • 23,228
  • 4
  • 34
  • 43
  • Figures. Maybe I should go back to learning how to program while drunk. Thanks for catching something so simple. Can't see the forest for the trees. – Zenichi Feb 04 '20 at 03:24