+ 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?
9 RĂ©ponses
+ 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 đ
+ 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/
+ 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 !
+ 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.
+ 2
Martin Taylor I dont lol. I've heard about its failings though
+ 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.
- 3
Hi