How do you do graphics in C using GCC? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How do you do graphics in C using GCC?

I use gcc on Debian Linux, and I want to do graphics programming on it. When I try to use graphics.h on it, it says “file or directory not found,” referring to graphics.h. Is there any way to do graphics programming with gcc?

8th Nov 2020, 10:14 PM
Aria
Aria - avatar
7 Answers
+ 12
You can run graphics in turbo c++(although not appreciated due to constant crash of the software taking place.. abruptly creating frustration) You can use dev c++..for that install graphic.h library externally.. //I personally run programs of computer graphics in it. Make sure while compiling you set the compiler to 4.8.1 32-bit since it doesn't work on 64 bit. You can alo run graphic programs in vs code..but again graphic header file should be installed externally. //If you won't believe then see my latest code on github..I just uploaded it yesterday 😆
9th Nov 2020, 6:33 AM
Aditya
Aditya - avatar
+ 7
graphics.h is a vendor specific header for a library that is no longer supported since 1997, also it was never a standard header so it should be expected that it doesn't come with any morden standard compiler like gcc. But this doesn't mean you can't work with graphics in C/C++, you have to get your hands on some morden graphic libraries for that for that, OpenGL is a good one but since that’s a very low level thing with C-style code, you’ll have to learn quite a lot However, there are many libraries that will take care of all the complicated stuff for you to make the job easier ,for example SDL is an amazing option for that. You can also find more like these online. Link of OpenGL's website👇 https://www.opengl.org// Link of SDL's website👇 https://www.libsdl.org/
9th Nov 2020, 1:35 AM
Arsenic
Arsenic - avatar
+ 3
first GCC it's a compiler so it isn't GCC the problem I think it may come from the path that you assing on the compiling phase or because there is not graphic.h library in GCC hope i helped you a bit !
9th Nov 2020, 12:16 AM
Ambitionist
Ambitionist - avatar
+ 2
Arsenic Oh I didnt realize it hasnt been supported since before I was even born loI. I will look into OpenGL and SDL though.
9th Nov 2020, 2:22 AM
Aria
Aria - avatar
+ 2
Martin Taylor I dont lol. I've heard about its failings though
9th Nov 2020, 3:26 PM
Aria
Aria - avatar
+ 1
Ambitionist Well if theres not a graphics.h library, then it is a GCC problem. But I see what you mean. I'll do some research about it.
9th Nov 2020, 1:13 AM
Aria
Aria - avatar
- 3
Hi
10th Nov 2020, 12:33 PM
ريمه