Like Tree3Likes
  • 1 Post By ledow
  • 2 Post By phantomotap

Geeting error in using graphics.h header file as shown in attachment.

This is a discussion on Geeting error in using graphics.h header file as shown in attachment. within the C Programming forums, part of the General Programming Boards category; i am running turbo c++ 4.5 in windows xp mode in windows 7....

  1. #1
    Registered User Rakesh o_O's Avatar
    Join Date
    Jun 2012
    Location
    India
    Posts
    9

    Geeting error in using graphics.h header file as shown in attachment.

    i am running turbo c++ 4.5 in windows xp mode in windows 7.

    Name:  25-Mar-13 3-01-23 PM.jpg
Views: 1092
Size:  61.6 KB

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    I believe the error message is correct - you have to go back to ACTUAL Windows XP (or Windows 2000) to run BGI graphics. They decided not to support BGI graphics because it was considered obsolete, is what I heard.

    However, you should be able to answer this definitively with a quick Google search. I'm not a Windows 7 guru, certainly.

    As soon as you can, I'd move over to a modern compiler - there are a few good and free ones. You will really enjoy the capability they give you on Windows 7.

  3. #3
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    Because BGI graphics interacted with the screen directly. That's a lot more complex under something like Windows (because you DON'T have exclusive access to the screen, you don't know what driver the screen is using, they may not even be VESA/VGA compatible, and security-wise it's a nightmare) and so it's not allowed. Even in "XP Mode", which is basically an emulator, you can't use something that was originally designed for DOS-mode graphics (which predate XP by some decade or more).

    Turbo-C++ v5 apparently supported Windows by having a bit of a rewrite, but honestly that was last used in 1997 (so only 16 years old!).

    Try stopping running a compiler from 1992 on a Windows 7 machine, and get something vaguely modern. What you just asked is why can't you use the engine from a Ford Model T to power a 2013 Ford Fusion?

    There are several dozen free C++ compiler/IDE suites on Windows. Use one that was released in this millennium (at least), and problem solved.
    Salem likes this.

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,188
    i am running turbo c++ 4.5 in windows xp mode in windows 7.
    You are running a virtual environment created in 2001 under an operating system released in 2009 just to run a tool created in 1995 that builds software primarily for an operating system that was basically abandoned as a real product the following year?

    Glorious.

    Soma
    Salem and AndiPersti like this.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Intro for graphics header file in c
    By balaKannan in forum C Programming
    Replies: 2
    Last Post: 12-15-2010, 12:12 PM
  2. New to C++, Header File Error
    By kspill2 in forum C++ Programming
    Replies: 2
    Last Post: 09-09-2007, 02:34 PM
  3. header file error
    By beon in forum C Programming
    Replies: 7
    Last Post: 11-16-2006, 06:33 AM
  4. Graphics header file
    By QuincyEQ in forum C++ Programming
    Replies: 1
    Last Post: 05-04-2002, 02:38 PM
  5. Graphics header file problem
    By Senkoma in forum C++ Programming
    Replies: 1
    Last Post: 09-04-2001, 05:26 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21