-
Graphics
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 cprogramming.com 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.
-
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).
-
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?
-
_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.
-
_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