Thread: BGI Error: Graphics not initialized (use 'initgraph');

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    7

    BGI Error: Graphics not initialized (use 'initgraph');

    help!

    why is it when i compile my program and run it stand alone (not on a TC directory) it gets an error:

    BGI Error: Graphics not initialized (use 'initgraph');

    please help!

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    You have to setup a graphics mode before you can to drawing operations. Use the function initgraph() to do that.
    I'm no expert on BGI graphics though.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Sep 2002
    Posts
    7
    i got no prob with the code... it runs perfectly.. but the compiled EXE file when i run it stand alone it returns that error. but on TC it runs with no hassle! please help..

  4. #4
    Registered User
    Join Date
    Aug 2001
    Posts
    380
    Maybe it's because it can't find the *.bgi files such as egavga.bgi.
    Don't you dare hit me on the head, you know I'm not normal.
    A Stooge Site
    Green Frog Software

  5. #5
    Registered User Commander's Avatar
    Join Date
    Sep 2001
    Posts
    801
    the file variable to the egavga.bgi and change it to where the ega.. file is in ur comp....that will fix everything....hopefully
    oh i'm sorry! i didn;t realize my fist was rushing to meet ur face!

    MSN :: [email protected] []*[]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. BGI Error:
    By it4_saravana in forum C Programming
    Replies: 4
    Last Post: 04-12-2008, 02:48 AM
  2. How tell if pointer has been initialized?
    By 6tr6tr in forum C++ Programming
    Replies: 6
    Last Post: 04-11-2008, 04:50 PM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. BGI and text cursor
    By Somnambulist in forum C++ Programming
    Replies: 4
    Last Post: 01-21-2004, 07:54 PM
  5. Borland C++ BGI
    By Xterria in forum Game Programming
    Replies: 10
    Last Post: 03-05-2002, 08:39 PM