Thread: Graphics

  1. #1
    Registered User
    Join Date
    Oct 2003


    I have been out of programming for a few years now, I want to get back into it because cs is my major, anyways I am trying to figure out how to get into graphics mode. I have tried using the graphic files and libs at but I always get errors when I try to compile. This is what happens when I try to compile svga.cpp(it is under source code/graphics/libraries.

    39 C:\WINDOWS\Desktop\svga.cpp
    `_AX' undeclared (first use this function)
    and a lot of other errors too, but that is the first one.

    Does anyone know what could be wrong? All I did was download and open the file so its not like I messed up typing.
    I use Dev-C++ and that didn't work so I also tried djgpp and that didn't work either. I also tried compiling some of the other graphic programs and couldn't. Any thoughts? Thanks in advance.

  2. #2
    Join Date
    Feb 2003
    Well, for graphics tutorial suggestions, i would reccomend this link ;however, i would say you should get back into programming regular(console) C++ based apps, and get a major hand of that before attempting graphics programming(your trips through C++ should teach you advanced problem solving which is vital in graphical programming).

  3. #3
    Registered User
    Join Date
    Oct 2003
    True, I should get C++ understood better before I try to program games, but my question is why wont a simple file I downloaded and opened not compile? Is there something wrong with my compiler?

  4. #4
    Hardware Engineer
    Join Date
    Sep 2001

    _AX is not defined....

    Well, I'm not sure where _AX is supposed to be defined... maybe it's supposed to be in <dos.h>??? Do your compilers have <dos.h>? You might try including <windows.h>, because there are tons of constants defined in windows.h.

    The "problem" with graphics, as you may know, is that graphics are not part of standard-portable C++. So, you have to make sure that your compiler, graphics library, book/tutorial, operating system, and hardware are all compatable.

    Have you done any Windows programming? Because the WinAPI has quite a bit of graphics included, and IMHO it's a good place to start.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    _AX is a mysterious global variable used as a 'hack' in old DOS compilers.
    If you want graphics in Dev-C++, then I suggest you start with say libsdl, which is IIRC part of the latest dev-c++ distribution
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Turtle Graphics, how does it work?
    By freddyvorhees in forum C++ Programming
    Replies: 15
    Last Post: 08-28-2009, 09:57 AM
  2. Graphics Programming :: Approach and Books
    By kuphryn in forum Windows Programming
    Replies: 4
    Last Post: 05-11-2004, 08:33 PM
  3. egavga.bgi problem
    By sunil21 in forum A Brief History of
    Replies: 3
    Last Post: 09-22-2003, 05:06 PM
  4. Graphics Devices and Cprintf clash
    By etnies in forum C Programming
    Replies: 6
    Last Post: 05-09-2002, 11:14 AM