Questions tagged [winbgi]

Emulation of Borland's BGI (Borland Graphics Interface)

Emulation of Borland's BGI (Borland Graphics Interface)

This is also called WinBGIm.

27 questions
5
votes
2 answers

Redefinition of int right error using winbgim library

I have a problem with making a program that uses winbgim.h header file. It is a simple program that makes just one simple circle. I am currently learning about winbgim and graphics.h libraries. I downloaded it, I downloaded the library and included…
Adem Dinarević
  • 175
  • 1
  • 4
  • 12
2
votes
2 answers

How do I clean input buffer before using getch()?

So, I am using GetAsyncKeyState() to see when some key is pressed. But, after using it I need to use getch(). But it seems that getch() gets whatever GetAsyncKeyState() got before again. That is the version of my simplified code: #include…
user3496846
  • 1,627
  • 3
  • 16
  • 28
1
vote
2 answers

compiler error when trying to show text using winbgi

I have a string that I want to show on the winbgi window using outtextxy. The problem is outtextxy only takes the pointer of a char array which shows a compiler error. Here is the code for(int i=0;i<13;i++){ setcolor(RED); …
AidenFive
  • 29
  • 1
  • 7
1
vote
1 answer

Why is winbgi function settextstyle() occupying memory on the heap?

I am making a snake game in C using winbgi library. I have a problem with function settextstyle(). Every call of function adds memory to the heap (about 50kb). I have to use this function in loop, so at some point the heap starts to overflow. Is…
Michu01
  • 15
  • 3
1
vote
0 answers

Application using the winbgi library crashes when used with Code::Blocks

I am having trouble when trying to run a graphics program through codeblocks. It just opens console and crashes when I click the build&run button. I have tried many other graphics program the result is still the same. And also I tried to debug it…
dip chit
  • 13
  • 3
1
vote
2 answers

Drawing an arc in C++ Graphics.h

I'm using graphics.h in order to start with a bit of graphic in C++, but when I run the code the program crash. I'm using CodeBlocks as a compiler and Windows 8.1 as an operating system. What should I do in order to make it works? Here is the code:…
user11121949
1
vote
0 answers

Using graphics.h in Codeblocks gives cannot find lbgi error

Im trying to install the graphics.h into codeblocks. However, when I run any code assosiated with graphics.h I get the message "ld.exe||cannot find -lbgi|". This previous Stackoverflow question appears to be by someone with the same issue, I have…
skifans
  • 125
  • 1
  • 6
1
vote
3 answers

CodeBlocks error in graphics library

I executed the following code in codeblocks IDE- #include #include using namespace std; int main() { int gd = DETECT, gm; initgraph(&gd, &gm, "C:\TC\BGI"); line(100, 200, 150, 250); cout << "Hello world!" <<…
Akash21795
  • 61
  • 1
  • 12
0
votes
0 answers

Graphics.h in vscode

I want to run in VsCode. For that, i downloaded the 3 files(graphics.h, winbgim.h and libbgi.a) and pasted them in their respective folders and the sqqiggly lines under graphics.h are not coming anymore. But when I go to execute the…
0
votes
1 answer

Why my C++ Graphics Program is not showing any output with g++ compiler?

I have written a code in C++, which is given below. The program is compiling successfully. But, when I'm trying to run the .exe file, then I am not getting the desired output. My…
Kalpadiptya Roy
  • 95
  • 1
  • 11
0
votes
0 answers

How do I get Dev-C++ set up for 2d graphics

right now I am only ready to take on the most rudimentary graphics, i.e. that for engineers and scientists. I have placed the WinBGIm files in their respective folders and added the names of the 6 files to the linker command. However, when I…
0
votes
0 answers

How to add C graphics.h library in Eclipse IDE

I'm trying to use some C graphic functions in Eclipse. I've copied WinBGIm files in the include/lib directories inside MINGW, but graphics.h library doesn't work yet.what is the solution? c:\mingw\include\graphics.h:30:10: fatal error: sstream: No…
samit
  • 1
  • 1
0
votes
0 answers

How to stop the constant flickering while playing animation?

I was trying to make a simple animation of a stickman walking, in graphics library in C. My code: #include #include void swap(int *x, int *y){ int temp=0; temp=*x; *x=*y; *y=temp; } int main(){ int…
user11620448
0
votes
1 answer

How do you fix errors E0167 and C2664 when drawing lines with graphics.h in Visual Code 2019?

When I try to draw lines in Visual Studio 2019 with graphics.h I keep getting 2 types of errors. This is an example I'm trying to get to work on my compiler from geeksforgeeks.org Errors E0167 - argument of type "const char*" is incompatible with…
0
votes
0 answers

Process returned -1073741819 (0xC0000005) Error when compiling C++ Clock

I am trying to make a digital clock. I understand that the error message is due to a memory problem. My Build log don't show no error. I have successfully included the libbgi.a as a linked library and the -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32…
JamSos
  • 19
  • 2
1
2