Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!ceres.physics.uiowa.edu!news.iastate.edu!VAXF.IASTATE.EDU!TABU6 From: tabu6@CCVAX.IASTATE.EDU (Adam Goldberg) Newsgroups: comp.lang.c Subject: Re: Auto Search for BGI in Turbo C Message-ID: <1991Mar17.162020.6858@news.iastate.edu> Date: 17 Mar 91 16:20:20 GMT References: <65841@eerie.acsu.Buffalo.EDU> Sender: news@news.iastate.edu (USENET News System) Reply-To: tabu6@CCVAX.IASTATE.EDU Organization: Iowa State University, Ames, IA. Lines: 36 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). ------------ Part II: if(a=b) { ... } has legitimate use. This is a non-atomic slightly modified TestAndSet. +----------------------------------------------------------------------------+ + Adam Goldberg H:(515)233-5135 + + Iowa State University TABU6@ccvax.iastate.edu + + "It's simple! Even a Pascal programmer could do it!" + +----------------------------------------------------------------------------+