Thread: Why wont anything compile?

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    10

    Why wont anything compile?

    I am using Dev C++, I try to compile anything and it usually comes back with errors, for example I tried to compile svga.cpp that is found in this site under graphic software/libraries, and it comes back with a huge list of errors, such as _AX undeclated and _BX undecleared.

    Does anyone know why I can't get this to work? Is it some compiler option I have to check or something of that sort?

    I tried it with djgpp also and couldn't do it either, thanks.
    WOO!

  2. #2
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    compile this:
    Code:
    #include <iostream>
    using namespace std;
    
    int main() {
     cout << "It works!" << endl;
     return 0;
    }
    If it compiles with an error, then you set the compiler up wrong. Otherwise, how the hell are we supposed to know how someones code needs to be compiled?
    Do not make direct eye contact with me.

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    10
    The thing is, I can compile anything I write myself, I also have gotton open gl stuff to work. But I can't compile svga.cpp, is there some option I need to use or something like that? The compiler is set up right, but I'm thinking maybe the code doesn't work with dev, maybe only other compilers?
    WOO!

  4. #4
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    Your title is outright false. Go ask the guy who wrote that library what the problem is.
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

  5. #5
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    I'm glad you think highly of us, but we aren't to the point where we can automatically sense a problem from the name of a file.
    Do not make direct eye contact with me.

  6. #6
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    The code he's referring to is from this page. My guess is that it needs a DOS compiler, like DJGPP.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  7. #7
    Registered User
    Join Date
    Oct 2003
    Posts
    10
    Yea I really thought you could tell the problem from the name of the file, no you jack ass I was wonding if anyone had experience with svga.h and the errors I got and could help me out.

    I tried it with djgpp as well, same errors.
    WOO!

  8. #8
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    You need a real DOS compiler to compile that - something like the old Borland Turbo-C

    If you're serious about graphics
    Dev-C++ uses libsdl (which is downloaded off one of the menus in dev-c++ v5)
    DJGPP uses Allegro
    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. C and C++ compile speed
    By swgh in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 01-02-2007, 02:37 PM
  2. Compile as you type
    By Rocketmagnet in forum A Brief History of Cprogramming.com
    Replies: 33
    Last Post: 12-07-2006, 01:36 PM
  3. How to compile mfc libs from platform sdk
    By tjcbs in forum Windows Programming
    Replies: 6
    Last Post: 11-19-2006, 08:20 AM
  4. Compile crashes certain windows
    By Loduwijk in forum C++ Programming
    Replies: 5
    Last Post: 03-26-2006, 09:05 PM
  5. How can I compile C or C++ with Visual Studio .NET?
    By Dakkon in forum C Programming
    Replies: 8
    Last Post: 02-11-2003, 02:58 PM