Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!sun-barr!newstop!exodus!appserv!sun!amdcad!dgcad!dg-rtp!gamecock!hagins From: hagins@gamecock.rtp.dg.com (Jody Hagins) Newsgroups: comp.lang.c Subject: Re: Auto Search for BGI in Turbo C Message-ID: <1991Mar19.202436.11978@dg-rtp.dg.com> Date: 19 Mar 91 20:24:36 GMT References: <65841@eerie.acsu.Buffalo.EDU> <1991Mar17.162020.6858@news.iastate.edu> Sender: usenet@dg-rtp.dg.com (Usenet Administration) Reply-To: hagins@gamecock.rtp.dg.com (Jody Hagins) Organization: Data General Corporation, Research Triangle Park, NC Lines: 38 In article <1991Mar17.162020.6858@news.iastate.edu>, tabu6@CCVAX.IASTATE.EDU (Adam Goldberg) writes: |> In article <65841@eerie.acsu.Buffalo.EDU>, haozhou@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@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.