Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 11th, 2006, 5:51 AM   #1
nineTENdo
Newbie
 
nineTENdo's Avatar
 
Join Date: Apr 2006
Posts: 3
Rep Power: 0 nineTENdo is on a distinguished road
Unhappy BGI graphics not supported under windows problem

hello everyone,
ive been trying to learn c for quite sometime now but i keep running in the same problems when trying to compile older program on older compliers. im running a BORLAND C++ 5.0 Complier on a WINDOWS 98 and i havnt been able to simple graphics on it i keep getting the same error on the GRAPHICS.H file. is there any way to check what kind of graphics card im running and simply change the types here is the exacte problem im running into:

#if defined( _Windows ) && !defined (__DPMI16__) && !defined(__DPMI32__)
#error BGI graphics not supported under Windows
#endif

I tryed searching for these files and replacing (_DPMI16_) and (DPMI32_) with
(_DPMI16bi_) and (_DPMI32vm_) of which i found instead but that didnt work either. What should i do?

Ive also tryed before to run Fractals from a book Programming Fractals in C that had the src files in those old big Floppy instead of the 3.1/4 floppies. so im pretty sure it has to be compalbility issue.
Thanks in adavance,
EL
nineTENdo is offline   Reply With Quote
Old Apr 11th, 2006, 5:58 AM   #2
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Quote:
Originally Posted by nineTENdo
hello everyone,
ive been trying to learn c for quite sometime now but i keep running in the same problems when trying to compile older program on older compliers. im running a BORLAND C++ 5.0 Complier on a WINDOWS 98 and i havnt been able to simple graphics on it i keep getting the same error on the GRAPHICS.H file. is there any way to check what kind of graphics card im running and simply change the types here is the exacte problem im running into:

#if defined( _Windows ) && !defined (__DPMI16__) && !defined(__DPMI32__)
#error BGI graphics not supported under Windows
#endif

I tryed searching for these files and replacing (_DPMI16_) and (DPMI32_) with
(_DPMI16bi_) and (_DPMI32vm_) of which i found instead but that didnt work either. What should i do?
Well I can't really help you as I'm on Win XP using VC2003 (on a laptop), but
#if defined( _Windows ) && !defined (__DPMI16__) && !defined(__DPMI32__)
#error BGI graphics not supported under Windows
#endif
Works here.

Quote:
Originally Posted by nineTENdo
Ive also tryed before to run Fractals from a book Programming Fractals in C that had the src files in those old big Floppy instead of the 3.1/4 floppies. so im pretty sure it has to be compalbility issue.
Thanks in adavance,
EL
Those 5.25 inch floppies were nice, didn't break, just a bit large (don't mean the capacity ).

EDIT: Welcome btw.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Apr 11th, 2006, 6:22 AM   #3
Mocker
Hobbyist Programmer
 
Mocker's Avatar
 
Join Date: Oct 2005
Location: Indiana
Posts: 214
Rep Power: 0 Mocker is an unknown quantity at this point
Send a message via AIM to Mocker
In the compiler, I forget where, but there is a location where you need to check under your project settings to tell Borland to use BGI graphics. Otherwise the compiler will not work with them.
__________________
#programmingforums relay - http://thegupstudio.com/cgi-bin/pforelay.cgi
freelance scripts - http://ryanguthrie.com/index.html
Mocker is offline   Reply With Quote
Old Apr 11th, 2006, 7:47 AM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Cut the Gordian knot. Get a good, free, modern compiler. Toss ancient learning materials.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Apr 11th, 2006, 12:25 PM   #5
InfoGeek
Professional Programmer
 
InfoGeek's Avatar
 
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4 InfoGeek is on a distinguished road
I second that. No need to waste time with some old and outdated compiler and library.
__________________
PFO - My daily dose of technology.
InfoGeek is offline   Reply With Quote
Old Apr 11th, 2006, 7:29 PM   #6
nineTENdo
Newbie
 
nineTENdo's Avatar
 
Join Date: Apr 2006
Posts: 3
Rep Power: 0 nineTENdo is on a distinguished road
So if i get Bloodshed C/C++ it will have an updated version of GRAPHICS.H file that can either run under windows or 98
nineTENdo is offline   Reply With Quote
Old Apr 11th, 2006, 8:20 PM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
98 IS Windows. Dev-Cpp doesn't have a graphics.h, at least in the typical distribution. It isn't a Borland compiler designed to run in a real-mode environment with a MS-DOS or similar operating system. It's just as well, because you almost certainly don't have one of those. If you do, shine it up and put it in a display case and get another system.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Apr 12th, 2006, 1:48 AM   #8
nineTENdo
Newbie
 
nineTENdo's Avatar
 
Join Date: Apr 2006
Posts: 3
Rep Power: 0 nineTENdo is on a distinguished road
So Graphics.H is only for ms-dos versions? Does it only come in Borland compilers? Can i find a updated Graphics.h file on the internet that support current WIndows VGA's?
nineTENdo is offline   Reply With Quote
Old Apr 12th, 2006, 2:58 AM   #9
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Quote:
Originally Posted by nineTENdo
So Graphics.H is only for ms-dos versions? Does it only come in Borland compilers? Can i find a updated Graphics.h file on the internet that support current Windows VGA's?
Why would you want to?
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Apr 12th, 2006, 6:28 AM   #10
InfoGeek
Professional Programmer
 
InfoGeek's Avatar
 
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4 InfoGeek is on a distinguished road
You can try your luck with Win32 GDI or OpenGL.
__________________
PFO - My daily dose of technology.
InfoGeek is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:23 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC