Question

I'm making a Turbo Pascal 7.0 program for my class, it has to be on Graphic Mode. A message pops up

BGI Error: Graphics not initialized (use InitGraph).

I'm already using InitGraph and graph.tpu and I specified the route as "C:\TP7\BGI".

My S.O is Windows 7 and I'm using DosBox 0.74, I already tried to paste all the files from the folder BGI into BIN.

What should I do?

Was it helpful?

Solution

Since dos doesn't have system graphic drivers, the BGI functions as such for BP7.

So in short, use a BGI suitable for your videocard. The ones supplied with BP7 are very old, there are newer, VESA ones that you could try.

Afaik 3rd party BGI needs to be registered explicitly in code though.

OTHER TIPS

At first I have had this "missing Graph.tpu"- ... and later the "Use Initgraph"-issue too.

After hours trying (and reading some not politeful comments in the internet) I finally got Turbo Pascal 7 succesfully running (in Windows 10, x64). In summary I want to share "some secrets":

  • install the "TP(WDB)-7.3.5-Setup.msi" (comes from clever people in Vietnam)

  • make sure, that there's the CORRECT PATH to the "BGI"-directory in your program-code. For example:

    driver := Detect; InitGraph (driver, modus, 'c:\TPWDB\BGI');

    (By the way: This is ALL, what's there to do with "Initgraph".)

  • make sure, that in TP7 under "Options" --> "Directories" are the CORRECT PATHS both to "C:\TPWDB\UNITS" and Your actual working dir e.g. "C:\TPWDB\myPrograms"

THAT's IT.

Annotations: The "Graph.TPU" (usually) is already in "UNITS" (together with "Graph3.tpu" by the way). Hazzling around old driver's isn't needed even... :)

Just the correct paths... :)

Hope, that can help ...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top