can somone help me! where can i find a turbo C compiler that has a BGI!
Coz i have a program that have some graphics but i can't run it through my compiler coz it doesn't have a BGI! is there someone who knows where i can find a complete compiler of turbo C with BGI!(borland graphic interface).
I had been searching on the net for 6 hrs. but i still can't find a complete compiler!

Dani AI

Generated

Two practical routes for ’s problem: either run the original Turbo C (DOS-era BGI) under an emulator, or keep the graphics calls but use a modern compiler + a BGI port. Turbo C/Turbo C++ is a discontinued, DOS/Windows‑era product; using it natively on current 64‑bit Windows is fragile. (en.wikipedia.org)

If the goal is to run existing graphics.h code on a modern toolchain, the common solution is WinBGIm (a Windows port of BGI) plus a MinGW-style compiler (Dev‑C++/Code::Blocks/MSYS2). Grab a WinBGIm build (use a 64‑bit build if the compiler is 64‑bit), copy the header(s) into the compiler’s include folder and libbgi.a into lib, then add the usual linker flags. Example linker flags and a compile line used by many guides:

g++ program.cpp -o program.exe -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32

If the library is 32‑bit but the toolchain is 64‑bit, either install a 64‑bit WinBGIm build (or rebuild libbgi for the toolchain) or compile for 32‑bit (-m32). Detailed setup notes and updated 64‑bit builds are available in community repos and how‑tos. (github.com)

Common pitfalls and alternatives: source files should be compiled as C++ (save as .cpp) and use g++ to avoid standard‑library/link issues. Missing -lbgi or unresolved references typically mean the library file is not on the linker path or the architecture (32/64) mismatches. For longer‑term portability and capabilities, consider moving to a maintained library (SDL2 or SFML for 2D; or OpenGL/GLFW for more control) — these are cross‑platform and actively supported (the route hinted at). For strict archival behavior (exact Turbo C IDE), run the old Borland package inside DOSBox. (stackoverflow.com)

Notes tied to this thread: ’s suggestion to use modern IDEs is practical; is correct that old Borland packages exist in archives (use them only in DOSBox); ’s 32/64 comment reflects a real compatibility issue — but WinBGIm and rebuilt libs remove that obstacle.

Recommended Answers

All 4 Replies

probably because BGI requires a 32-bit compiler, which TurboC is not. Upgrade to one of the free compilers mentioned in that link.

where can i find a turbo C compiler

That thing's old and outdated. Get yourself a copy of Dev-C++ or Visual Studio Express.

probably because BGI requires a 32-bit compiler, which TurboC is not. Upgrade to one of the free compilers mentioned in that link.

Just the opposite. I was using BGI back with Turbo C++ 1.

Download from Borland:

Other old Borland stuff can be found .

Instead of using Libraray which draws out jagged circles and which are non standard, better start using OpenGL since it has the same learning curve as that of your BGI (atleast for the basic things) and is much more useful and much more fun.

For eg. if you have to draw out a circle using the circle equation, you could use something like this:

while (some_control_loop) {
  // calculate the values of x and y using the std eqs.
  
glBegin(GL_LINES);


// All lines lie in the xy plane.
z = 0.0f;
for(angle = 0.0f; angle <= GL_PI; angle += (GL_PI/20.0f))
  {
  // Top half of the circle
  x = 50.0f*sin(angle);
  y = 50.0f*cos(angle);
  glVertex3f(x, y, z);    // First endpoint of line

  // Bottom half of the circle
  x = 50.0f*sin(angle + GL_PI);
  y = 50.0f*cos(angle + GL_PI);
  glVertex3f(x, y, z);    // Second endpoint of line
  }

// Done drawing points
glEnd();

Well this is a simple eg which shows how u can draw a circle.
Hope it helped, bye.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.