I can't get this new compiler to work.

This is a discussion on I can't get this new compiler to work. within the C++ Programming forums, part of the General Programming Boards category; Since I couldn't get Dev-C++ to work again (I went so far as to uninstall, delete every remnant of dev-c++ ...

  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    40

    I can't get this new compiler to work.

    Since I couldn't get Dev-C++ to work again (I went so far as to uninstall, delete every remnant of dev-c++ related stuff left over that I could see, reboot, defrag, reboot, redownload the setup again but from a different mirror, install to a different directory than the one I installed to before, create a new project whose only code was
    Code:
    int main(int argc, char *argv[])
    {
      return 0;
    }
    and then compile that, and it would still crash at that point. See my last thread for more details on that.) I decided to just try a different compiler.

    I am now trying to use the Digital Mars compiler, but with no success. From what I read in its readme, it appears to be a command line compiler rather than an IDE, and it tells how to use it. I tried to do what it said, but it just gave a one-line example of how to use it. Whenever I try to use it, it says "Fatal error: unable to open input file 'test' --- errorlevel 1"

    So I have a few questions.

    Is Digital Mars a good compiler worth using?
    How do I use it to compile, link and build? Do I even have to go through each step, or will it do the whole process in one simple command like Dev-C++ did?
    Is there any place where I can find more information on Digital Mars and how to use it? Its own site offers little help.

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,066
    I've never used the digital mars compiler, but if you want to settle for a command line compiler, you can download GNU's GCC (g++ for C++ compiling) which is about at standard as it gets and it's what most of the major players would be using:

    http://gcc.gnu.org/
    Sent from my iPadŽ

  3. #3
    Registered User
    Join Date
    Mar 2006
    Location
    USA::Colorado
    Posts
    155
    Well, the problem is apparent.

    You're missing a very important element with programming:

    Code:
    int main(int argc, char *argv[])
    {
      return 0;
    }
    You're missing the
    Code:
    #include <iostream>
    
    using namespace std;
    **Put this just before your [main(int argc...)] statement

    like
    Code:
    #include <iostream>
    
    using namespace std;
    
    int main(int argc, char *argv[])
    {
      return 0;
    }

  4. #4
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,066
    Quote Originally Posted by guitarist809
    Well, the problem is apparent.

    You're missing a very important element with programming:
    Why would you need <iostream> to run an empty main? That's not his problem. Also, it's worth assuming that he might have just ommitted the standard includes from his example.
    Sent from my iPadŽ

  5. #5
    Registered User
    Join Date
    Mar 2006
    Location
    USA::Colorado
    Posts
    155
    yea, but I use the same complier as he, DEV-C++ the MinGW C++ Compliler. Everything works fine!

  6. #6
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,066
    No, reread his post. He uses the Digital Mars compiler. He couldn't get Dev-C++ to run. I appreciate your enthusiasm to answer questions, but be careful about giving incorrect information because you're still learning yourself. I already do plenty of that around here.
    Sent from my iPadŽ

  7. #7
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    You could always use Open Watcom instead of Digital Mars. No reason, just if you want - has it's own IDE too.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  8. #8
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Or download the command line versions of the Microsoft compiler. Or the command line Borland compiler, but the MS one is better. Or download Visual Studio 2005 Express, it's a free (as in beer) IDE with the newest MS compiler. (But no Platform SDK, so to develop Windows apps, you need to download and install that separately.)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why don't the tutorials on this site work on my computer?
    By jsrig88 in forum C++ Programming
    Replies: 3
    Last Post: 05-15-2006, 10:39 PM
  2. Dev C++ Compiler, Indentation?
    By Zeusbwr in forum C++ Programming
    Replies: 3
    Last Post: 10-21-2004, 06:13 AM
  3. lcc win32 compiler download problems
    By GanglyLamb in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 08-01-2004, 07:39 PM
  4. The DJGPP compiler won't start
    By Zahl in forum Tech Board
    Replies: 9
    Last Post: 11-20-2002, 09:54 PM
  5. Help with Borland c++ compiler!!!
    By Unregistered in forum C++ Programming
    Replies: 8
    Last Post: 11-27-2001, 09:53 PM

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