*IMPORTANT* If you guys face any issue that I have not mentioned in this video then explain your exact problem instead of saying like "It is not working".. you can also mail me screenshots (follow 14:52 and send) at rp181135198@gmail.com and don't forget to explain your problem.
@@arjitprakher73 I was facing the same issue, after checking on stack overflow, in virus and threat protection settings of windows defender, you will find exclusions option, there you can add your graphics folder. This can temporarily solve the issue. I think the .exe is detected as virus by windows defender, unsure as to why so, until they dont fix this false positive, excluding that folder is helpful
OMG this is the first tutorial I have ever watch that worked perfectly the first time. Like literally this is everything I have been pain stakingly searching for. I have tried compiling things with cmake and using fork...etc but this worked and I love visual studio and vscode
Starting build... C:/TDM-GCC-32/bin/g++.exe -fdiagnostics-color=always -g C:\Users ites\GRAPHICS\test.cpp -o C:\Users ites\GRAPHICS\test.exe -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 C:/TDM-GCC-32/bin/../lib/gcc/mingw32/10.3.0/../../../../mingw32/bin/ld.exe: cannot find -lbgi collect2.exe: error: ld returned 1 exit status Build finished with error(s). * The terminal process terminated with exit code: -1. * Terminal will be reused by tasks, press any key to close it.
@@WakingWay Ah sorry mate I have no idea. I don't even remember this video or what this is about really. I gave the error code to chatgpt and it says you should do this: "To fix this error, you will need to install the BGI (Borland Graphics Interface) library on your system. This library provides support for graphics operations in C and C++ programs. You can find more information about the BGI library and how to install it on your system in the documentation for your C or C++ compiler or development environment." I don't know if that is correct though!
@@WakingWay Haha lol, honestly I wish I could help further, I have had my far share of random strangers help me in ways I couldn't even explain. And I wish to pass along that help to other when I can. Its just that 8 months of time can be kinda hard to remember a single video and comment haha.
Thank you so much for this amazing video :) I have seen many other videos that did not work but this worked just in the first attempt. Great. I request everyone to watch this video for graphics library installation. :)
Yeah, just about every other tutorial give errors and failed attempts. But this one worked for me the first time perfectly. I was even able to understand it well enough to set my own directories and slight variations to the setup process and it worked. Perfect tutorial!
Man you are amazing 😍 i was trying to do this the entire day i was frustrated 🥴 but you easily solved my problem thanks a lot 😃 and hats off to you man.
Thank you very much for this video. I am just not learnt how to execute graphics programs in vscode but also other programmer which required the linkers now i can execute all the programs that needs linker. Best video on youtube ♥ keep it up. Full Suppourt To you.
You have multiple Compilers installed in your computer. Open the "Makefile" of your project and search for the line which is something like "CXX = g++" Replace it with the below given line.. CXX = C:\TDM-GCC-32\bin\g++ And try again..
Sir you have great knowledge thanks for this help now I can say that your the hope of all the students in this you tube community thanks a lot ❤ sir thankyou very much. Thank you 🙏 very tends ♾️
Starting build... C:/TDM-GCC-32/bin/g++.exe -fdiagnostics-color=always -g C:\Users ites\GRAPHICS\test.cpp -o C:\Users ites\GRAPHICS\test.exe -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 C:/TDM-GCC-32/bin/../lib/gcc/mingw32/10.3.0/../../../../mingw32/bin/ld.exe: cannot find -lbgi collect2.exe: error: ld returned 1 exit status Build finished with error(s). * The terminal process terminated with exit code: -1. * Terminal will be reused by tasks, press any key to close it.
you have to set PATH in Environment Variables (in System Variables) to the bin folder in tdm-gcc-32 folder (please let me know if you need any help to set PATH)
*test : The term './test' is not recognized as the name of a cmdlet* I am getting this error every time Before that , My graphics Windows is showing but after making another file I build task and then type *./test in Terminal* & then it throws that error every time in Red Color PS E:\Programming\Logical_Programming> ./test ./test : The term './test' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + ./test + ~~~~ + CategoryInfo : ObjectNotFound: (./test:String) [], Com mandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Looks like you are using PowerShell as your terminal.. You don't need to write "./" part.. Just write executable file name something like "text.exe" (without double quotes) and hit enter..
Drawing operation was attempted when there was no current window This problem happens in my program First of all after program runs we have to put some input in it then It will draw line But it gets above problem
can you please tell me how to take input of coordinates in visual studio because whenever i try to code in such way that we take co-ordinates by user but its showing only on terminal and after giving coordinates its don't respond anything on bgi only blank as bgi output please tell me its really important for me
Its works, tested. Thank you How about if I want to modify the graphic output in windows of area m by n pixels, and what is the maximal values for m and n respectively?
please give me details where i can free download graphics.h its seemed the graphics.h that i had download not working with my software code block and visual studio code...
This is because the graphics.h library that you are using, actually it internally uses some C++ specific header files and those files are NOT available in C language. But you can write your C language code in a C++ file. It will work fine..
build successfully but while running...gives error. 'Program 'test.exe' failed to run: The specified executable is not a valid application for this OS platform.'
There is a bug in this version of WinBGI library's settextstyle() function. Every call of function adds memory to the heap (about 50kb). If used in infinite loop, at some point the heap starts to overflow. Eg. while(1) { settextstyle(DEFAULT_FONT, HORIZ_DIR, 4) outtext(...) settextstyle(DEFAULT_FONT, HORIZ_DIR, 2) outtext(...) } Can you please update the library.
settextstyle() is fine I have noticed outtext() and outtextxy() and some shape fill related functions have this issue.. And that's why I suggest everyone to use graphics library for learning purpose and must NOT use it for creating some bigger project which uses too much text printing and filled shapes in it.
@@codewar I'm able to build task successfully follow method #1. But when open "New terminal" and type ./filename I get error *"The term './filename' is not recognized as a name of a cmdlet, function,script file or operable program. Check the spelling of the name or if a path was included, varify that the path is correct and try again."* Please help.
I had downloaded VS Code before and used it to run C programs, but when I did like the first method, it showed error "No such file or directory" at which I declared graphics.h
@@codewar I'm able to build task successfully follow method #1. But when open "New terminal" and type ./filename I get error *"The term './filename' is not recognized as a name of a cmdlet, function,script file or operable program. Check the spelling of the name or if a path was included, varify that the path is correct and try again."* Please help.
Yes, you can have multiple compilers installed in your computer. And by the way I have used g++ in this video. The only thing is it's a 32bit Compiler and I suggest you to go with the same for avoiding any error.
I already tried to do it in past but not got success. Also I don't use Visual Studio so I don't know much about its settings. If I get any solution then I will create a video about it in future. Can't promise though..
Looks like you have saved your program in a folder where your vs code has no permission to execute it.. Or maybe there is some other issues related to execution permission in the folder location where you saved your program..
Can you tell me location where you saved your program and have you given your vs code permission to access files in that folder.. VS Code asks about whether you trust the author or not.. You will have to give permission to it.
You guys got the same file. Only the extension name is not visible to you because it is disabled in Explorer by default. To enable it, follow the below instructions.. 1. Open File Explorer (open any folder). 2. Click the View tab. 3. Select "File name extension" Filename extensions will now be visible.
*IMPORTANT*
If you guys face any issue that I have not mentioned in this video then explain your exact problem instead of saying like "It is not working".. you can also mail me screenshots (follow 14:52 and send) at rp181135198@gmail.com and don't forget to explain your problem.
can you plz let me know how to do it on Mac
Pls put tutorial for 64 bit too as it gets very very confusing
When i do 1st method my pc says threats found and don't show output.... So, what will i do!!!!
Windows defender is not allowing it to run, what to do
@@arjitprakher73 I was facing the same issue, after checking on stack overflow, in virus and threat protection settings of windows defender, you will find exclusions option, there you can add your graphics folder. This can temporarily solve the issue.
I think the .exe is detected as virus by windows defender, unsure as to why so, until they dont fix this false positive, excluding that folder is helpful
OMG this is the first tutorial I have ever watch that worked perfectly the first time. Like literally this is everything I have been pain stakingly searching for. I have tried compiling things with cmake and using fork...etc but this worked and I love visual studio and vscode
Starting build...
C:/TDM-GCC-32/bin/g++.exe -fdiagnostics-color=always -g C:\Users
ites\GRAPHICS\test.cpp -o C:\Users
ites\GRAPHICS\test.exe -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
C:/TDM-GCC-32/bin/../lib/gcc/mingw32/10.3.0/../../../../mingw32/bin/ld.exe: cannot find -lbgi
collect2.exe: error: ld returned 1 exit status
Build finished with error(s).
* The terminal process terminated with exit code: -1.
* Terminal will be reused by tasks, press any key to close it.
got this error, What to do brother?
@@WakingWay Ah sorry mate I have no idea. I don't even remember this video or what this is about really. I gave the error code to chatgpt and it says you should do this:
"To fix this error, you will need to install the BGI (Borland Graphics Interface) library on your system. This library provides support for graphics operations in C and C++ programs. You can find more information about the BGI library and how to install it on your system in the documentation for your C or C++ compiler or development environment."
I don't know if that is correct though!
@@SpicyMelonYT chatgpt never leaves the chat these days!!hehe
thanks for your time man.
@@WakingWay Haha lol, honestly I wish I could help further, I have had my far share of random strangers help me in ways I couldn't even explain. And I wish to pass along that help to other when I can. Its just that 8 months of time can be kinda hard to remember a single video and comment haha.
Subscribed!!! Thank you so much sir I have been roaming in the internet for hours to search for a solution until I found your video.
Thank you so much for this amazing video :) I have seen many other videos that did not work but this worked just in the first attempt. Great. I request everyone to watch this video for graphics library installation. :)
Yeah, just about every other tutorial give errors and failed attempts. But this one worked for me the first time perfectly. I was even able to understand it well enough to set my own directories and slight variations to the setup process and it worked. Perfect tutorial!
Compiler arguments
-lbgi
-lgdi32
-lcomdlg32
-luuid
-loleaut32
-lole32
REALLY THIS VIDEO WAS VERY HELFUL FOR ME THANKS FOR EXPLANING IN SUCH A NICE WAY
Thanks bro.. Happy to help!!
Enjoy your rest of your day/night.. ✌️
Man you are amazing 😍 i was trying to do this the entire day i was frustrated 🥴 but you easily solved my problem thanks a lot 😃 and hats off to you man.
Thank you very much for this video. I am just not learnt how to execute graphics programs in vscode but also other programmer which required the linkers now i can execute all the programs that needs linker. Best video on youtube ♥ keep it up.
Full Suppourt To you.
Thank you so much for this video by following your each step i installed it in few minutes .it make installation easy for us
Thank you soo much sir❤ i was stuck with it since 2 days finally completed with your 1st methods
It is very helpful who want to start graphic programming in vs code. and also that method is working.
This man is really supporting and helpful please guys like the video for all the learner of cgi
Hello sir i have tried your 3rd step today but it shows missing property program how how to solve this problem
Sir today I have done same work with your third option but same problem is today also
You have multiple Compilers installed in your computer.
Open the "Makefile" of your project and search for the line which is something like "CXX = g++"
Replace it with the below given line..
CXX = C:\TDM-GCC-32\bin\g++
And try again..
Sir you have great knowledge thanks for this help now I can say that your the hope of all the students in this you tube community thanks a lot ❤ sir thankyou very much. Thank you 🙏 very tends ♾️
You're most welcome!
Enjoy the rest of your day.. ✌️
It is totally working...
One request please upload bresenhams line draw in c or c++
Thanks you so very much. i was not able to do this and was stuck for almost 4 months now. Thank you very much. :D
God bless brother! Please keep making these videos for noobs like me.
bro this was the best video on this topic thank you very much
Really this video was so helpful..👍
Really grateful for this tutorial, thanks a lot.🙏
Useful Video for Students..👩💻
& Thanks...🤗👍
i have followed first method , after successfully building the code the .exe file is not showing any graphics window. What should i do now?
*Thank you very much sir everything is working properly 👍👍*
in view command pallete..option of c++ ui isn't coming ..can u pls guide what's the issue and how to solve
Thank you, salute to you for helping us!
you helped man
thank you
In second method, after running the program it says graphics.h no such files or directory. First method worked fine
Starting build...
C:/TDM-GCC-32/bin/g++.exe -fdiagnostics-color=always -g C:\Users
ites\GRAPHICS\test.cpp -o C:\Users
ites\GRAPHICS\test.exe -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
C:/TDM-GCC-32/bin/../lib/gcc/mingw32/10.3.0/../../../../mingw32/bin/ld.exe: cannot find -lbgi
collect2.exe: error: ld returned 1 exit status
Build finished with error(s).
* The terminal process terminated with exit code: -1.
* Terminal will be reused by tasks, press any key to close it.
I got this error while running build task, please help me out!!
Thank u bro, u are the best!
Thank you for the video keep up to good work.
i already have migw compiler can i use both the compiler respectivly
Very nice explanatin. WOrked perfectly. Big thanks
I've done everything right...but when i run the code...it says that the graphics.h : No such file or directory
Send me screenshot of your program, build logs and output (if any) at rp181135198@gmail.com
Can the mobile phone be used?
Thanks Bhai
You gave your time for me
My pleasure bro!
And thanks for your patience.. I hope this video was worth it..
Enjoy your day!!✌️
👏👏👏Lord is here
Sir my code is executing but it's not opening any window in which the shape has to come
Pls help sir
Send me the screenshot of your program, build log and output (if any) at rp181135198@gmail.com
Working properly, well done
Sir edit configurations mai compiler path update krne ke liya jo apne path btaya voh nhi aarha hai please help
C/C++ & Code Runner Extensions Unistall kro aur Fir se Install karke Enable kro. ho jayega
Thankyou sir it worked !
sir my 'g++' is not recognized as an internal or external command,
operable program or batch file.
you have to set PATH in Environment Variables (in System Variables) to the bin folder in tdm-gcc-32 folder (please let me know if you need any help to set PATH)
@@TeluguSoft i need ur help to set class path
@@rajanarora9109 hello, can you please provide more details
Really really thank ful😩♥️
I dont have a launch.jsn option available how to set up the debugger now ?
*test : The term './test' is not recognized as the name of a cmdlet*
I am getting this error every time
Before that , My graphics Windows is showing
but after making another file I build task and then type *./test in Terminal* & then it throws that error every time in Red Color
PS E:\Programming\Logical_Programming> ./test
./test : The term './test' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of
the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ ./test
+ ~~~~
+ CategoryInfo : ObjectNotFound: (./test:String) [], Com
mandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Looks like you are using PowerShell as your terminal.. You don't need to write "./" part.. Just write executable file name something like "text.exe" (without double quotes) and hit enter..
When I run test.cpp it creates test.exe file but when I run "./test" terminal. The .exe file gets disappear.
WHY?
It's work for the python?
Drawing operation was attempted when there was no current window
This problem happens in my program
First of all after program runs we have to put some input in it then It will draw line
But it gets above problem
thank you so much it is working perfectly
can you please tell me how to take input of coordinates in visual studio because whenever i try to code in such way that we take co-ordinates by user but its showing only on terminal and after giving coordinates its don't respond anything on bgi only blank as bgi output
please tell me its really important for me
in terminal section
What is the solution for mac users
Thanks it helped me a lot!!
But I have already installed MingW compiler 😞
Help! I have windows 11 and it is not letting me install the 32 bit version of apps on windows 11
iske liye turbo c download krna padega kya
Bilkul nahi.. No need of Turbo C..
I know what you mean.. 😅
thinks , very usefull and very easy to do it more thinks
🙏🙏🙏🙏🙏
Thanks Man
Thankyou so much sir.
Showing error that -lgbi cannot find in second method
Sir when I am using the second method, I am not having undefined reference error but another error is coming... Cannot find lcomdgl32... Please solve
14:38 HOLY MOLY SMOKES! I DIDN'T WRITE THE FLAGS PROPERLY😂😂😂😂
Thanks man,
ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]gcc can you help me, i cant run even first run
Paste option is not working to paste in include after copying path
Its works, tested. Thank you
How about if I want to modify the graphic output in windows of area m by n pixels, and what is the maximal values for m and n respectively?
Have you seen a trojan alert while following the steps? Be careful
This doesn't work for m1 macs...can you please make a video for it?
Thank you very much!
please give me details where i can free download graphics.h its seemed the graphics.h that i had download not working with my software code block and visual studio code...
It's already free and it works on both CodeBlocks and VS Code..
Just go through my uploaded videos, you will find how to setup it in both of them.
Worthy!! 🙌🏻
Btw tq for providing header file but i want to use it in c program??? But it showing error♥️
This is because the graphics.h library that you are using, actually it internally uses some C++ specific header files and those files are NOT available in C language.
But you can write your C language code in a C++ file. It will work fine..
@@codewar ohh okk thankyou ✨️
Build finished with error... what do I do next?
C:/TDM-GCC-32/bin/g++.exe
check this in Edit configuration UI at the last g++
Thank you, friend :)
build successfully but while running...gives error.
'Program 'test.exe' failed to run: The specified executable is not a valid application for this OS platform.'
Send me screenshot of your program code, build log, output (if any) (follow 14:52 and send) at rp181135198@gmail.com
thanks for your video could you please make a video abaut C graphics in vs code i try to make a code but i recive an error .
Just write your C language code in a C++ file, it will work fine.
There is a bug in this version of WinBGI library's settextstyle() function.
Every call of function adds memory to the heap (about 50kb). If used in infinite loop, at some point the heap starts to overflow.
Eg.
while(1)
{
settextstyle(DEFAULT_FONT, HORIZ_DIR, 4)
outtext(...)
settextstyle(DEFAULT_FONT, HORIZ_DIR, 2)
outtext(...)
}
Can you please update the library.
settextstyle() is fine I have noticed outtext() and outtextxy() and some shape fill related functions have this issue.. And that's why I suggest everyone to use graphics library for learning purpose and must NOT use it for creating some bigger project which uses too much text printing and filled shapes in it.
@@codewar I'm able to build task successfully follow method #1.
But when open "New terminal" and type ./filename I get error *"The term './filename' is not recognized as a name of a cmdlet, function,script file or operable program. Check the spelling of the name or if a path was included, varify that the path is correct and try again."*
Please help.
bro please help me
Build finished with error(s).
Explain your issue or send me screenshots by following 👉 (14:52) at rp181135198@gmail.com
I had downloaded VS Code before and used it to run C programs, but when I did like the first method, it showed error "No such file or directory" at which I declared graphics.h
Most probably you are using a 64bit Compiler.
Download and install 32bit compiler from the below given link and try again..
jmeubank.github.io/tdm-gcc
@@codewar of course I did that, cause that I followed your second part, Setting compiler and Graphics file, just dont know what happened :(
But I download 32 bit but also showing graphics.h file not found
@@codewar I'm able to build task successfully follow method #1.
But when open "New terminal" and type ./filename I get error *"The term './filename' is not recognized as a name of a cmdlet, function,script file or operable program. Check the spelling of the name or if a path was included, varify that the path is correct and try again."*
Please help.
@@blackpanthar906same problem I am facing now
does it work for mac also?
Thank you
I want to do it on g++ compiler is it possible ??
If not then can I have both g++ and your suggested compiler at the same time!!!??
Yes, you can have multiple compilers installed in your computer. And by the way I have used g++ in this video. The only thing is it's a 32bit Compiler and I suggest you to go with the same for avoiding any error.
After all succesful work.
For me it says Incompatible with 64 bit
64 bit compiler wale kya kare fir batao
hi my friend can you help me how to install graphics.h in visual studio 2019?? thank you in advance
I already tried to do it in past but not got success. Also I don't use Visual Studio so I don't know much about its settings. If I get any solution then I will create a video about it in future. Can't promise though..
bro what is the Procedure for Mac m1 ?
When I try to go by 2nd method it throws this error :
Cannot open the . exe file :Permission denied
Please give me solution
Looks like you have saved your program in a folder where your vs code has no permission to execute it.. Or maybe there is some other issues related to execution permission in the folder location where you saved your program..
@@codewar so how I can solve the problem will u please elaborate 🙏
Can you tell me location where you saved your program and have you given your vs code permission to access files in that folder.. VS Code asks about whether you trust the author or not.. You will have to give permission to it.
@@codewar it is saved on desktop
@@codewar please help me out
great video ..its working:)
what version winbgim that in your link?
Only the first part works
In the other two methods my code doesn’t run
Sir i got error when i compile,
Error is graphics file not found
Make sure you have copied graphics library files at right folder location.. And your compiler is set correctly..
It is showing cannot find lcomlg32
Thank you sir
Good👍
Thanks buddy..
Thanks a ton!!
1st part done but in second part it is not creating exe file and giving error [Done] exited with code=1 in 0.101 seconds
I guess your problem is solved already.. If not, then mail me screenshot of your program and build logs (follow 14:52) at rp181135198@gmail.com
Graphics.h file kitne bit ki hai
It 32bit library.. You must use it with 32bit GCC compiler.
And it doesn't matter whether your Operating System is 32bit or 64bit, it will work fine.
Thanks bro
Path error ko Kaise hatai bhaiya
But Graphics Program In c for?
Write your C language code in a ".cpp" file, It will work fine..
Thanks a lot
What if, after extracting, we get graphics file instead of graphics.h ?
same problem here... did you get the solution for that?
You guys got the same file. Only the extension name is not visible to you because it is disabled in Explorer by default.
To enable it, follow the below instructions..
1. Open File Explorer (open any folder).
2. Click the View tab.
3. Select "File name extension"
Filename extensions will now be visible.
Sir I have mailed you my error along with ss please reply. Thanks!
Hi Anisha, check your mail..
@@codewar Thank you very much . The issue is resolved now 🙏🙏
Can someone please give me the link to download the graphic file😢😢😢😢😢😢😢
Check the video description..
Im getting unknown error