Where to get C header files?

Some of my c code compiles fine but others can't find header files.

Colored_Chars.c:4:10: fatal error: graphics.h: No such file or directory

Do I need to download them from some where?

I found this. Is this what I need to do? Under Using DSL

libraries - How do I use graphics.h in Ubuntu? - Ask Ubuntu

From what I understand, graphics.h is a very old library.

You can download and install it from many places on the net.

Normally, it's a good idea to search your filesystem to see if it's hanging around somewhere first.

Like Neo said, it is something old. If graphics.h does exist on your system, it may not be in the right path for gcc or clang to find it. I would do a find / -name "*graphics.h" and see if its on your system. If it does exist you can use the full path with #include. If not you might find that file online, download and link it with whatever directory you save it to.

Thanks. I think I need GTK+ 3.22 since graphics.h is so old.

1 Like