Auto Search for BGI in Turbo C
Jody Hagins
hagins at gamecock.rtp.dg.com
Wed Mar 20 06:24:36 AEST 1991
In article <1991Mar17.162020.6858 at news.iastate.edu>, tabu6 at CCVAX.IASTATE.EDU (Adam Goldberg) writes:
|> In article <65841 at eerie.acsu.Buffalo.EDU>, haozhou at acsu.buffalo.edu (Hao Zhou) writes:
|> >I wrote an application program using Turbo C graphics package. The
|> >only problem I have is that I have to keep the BGI driver in the
|> >current directory otherwise the program will say the BGI driver is not
|> >found.
|> >
|> >My question is how do I tell my program to search for the BGI driver
|> >in a path specified somehow if the BGI driver is not present in the
|> >current directory?
|> >
|>
|> It is possible to link the BGI driver in with the executable code (EXE file),
|> by:
|> o Using the BGIOBJ utility to create an OBJ verion of the BGI driver
|> o LINKing the OBJ BGI driver with your code OBJ file
|> o Doing either a 'registerbgidriver()' or 'registerfarbgidriver()' function
|> call before the 'initgraph()' call.
|>
|> (Consult your manual for further info--though I got this from the Waite Group's
|> Turbo C++ Bible -- these functions work in TC2.0 as well).
I use an environment variable BGI_DIR. If it's set, I use it. Otherwise,
I use the current directory.
--
Jody Hagins
hagins at gamecock.rtp.dg.com
Data General Corp.
62 Alexander Dr.
RTP, N.C. 27709
(919) 248-6035
Nothing I ever say reflects the opinions of DGC.
More information about the Comp.lang.c
mailing list