Thread: Compiler Issue

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    36

    Compiler Issue

    Code:
     #include <iostream>
    
    using namespace std;
    
    int main()
    {
      cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";
      cin.get();
    
      return 1;
    }

    That's the code I put in there(Yes its from the very first lesson :P )

    And I get this error when I try to build and run it..
    "Jesses C++ - Debug" uses an invalid compiler. Skipping...
    Nothing to be done.
    Can someone help me out?..

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    What command are you doing to compile this?
    bit∙hub [bit-huhb] n. A source and destination for information.

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    36
    I tell it to "Build" and it gives me that error.

  4. #4
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    In that case, what compiler are you using (or attempting to use)? My best guess right now is that you are using an IDE without selecting a compiler for it to use.
    bit∙hub [bit-huhb] n. A source and destination for information.

  5. #5
    Registered User
    Join Date
    Aug 2009
    Posts
    36
    I'm used CodeBlocks. It worked for me before and I got a new computer and this happened.

    How do I fix it? .

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by Jesse20ghet View Post
    I'm used CodeBlocks. It worked for me before and I got a new computer and this happened.

    How do I fix it? .
    Did you get Code::Blocks with compiler or Code::Blocks without compiler? If the latter, you will need to have a compiler (since Code::Blocks isn't, itself, a compiler).

  7. #7
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    BTW, returning anything other than 0 from main means error. It's a way for programs to inform the OS that something went wrong.

  8. #8
    Registered User
    Join Date
    Aug 2009
    Posts
    36
    Yeah I got the compiler I'm sure.

    Yeah cyber thanks :P. Its just in the tutorial .

  9. #9
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Yeah cyber thanks :P. Its just in the tutorial .
    Really? Are you sure it's not return 0? Which tutorial are you following?

  10. #10
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Settings -> Compiler and Debugger...

    At the very top is "Selected Compiler". Make sure it matches the compiler you have.

  11. #11
    Registered User
    Join Date
    Aug 2009
    Posts
    36
    How do I know if it matches my compiler or not?

  12. #12
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by Jesse20ghet View Post
    How do I know if it matches my compiler or not?
    Surely you should know what compiler you have....

  13. #13
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Ugh. For such a simple example, why bother with an IDE at all? Learn how to run the compiler on the command line and/or use a makefile. You can use an IDE when you start building more complex programs, but for learning exercises like this they just get in the way, and maybe even make it harder to learn.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by medievalelks View Post
    Ugh. For such a simple example, why bother with an IDE at all? Learn how to run the compiler on the command line and/or use a makefile. You can use an IDE when you start building more complex programs, but for learning exercises like this they just get in the way, and maybe even make it harder to learn.
    Ugh. Comments like these are highly subjective, and we had a discussion about these before, and I am going to tell you that I 100% disagree. Command lines are evil, and so are make files. Make files are especially evil for small, easy projects.
    This is all subjective, but then again, so is your opinion. An IDE is the best thing to do for a newbie.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by Elysia View Post
    Make files are especially evil for small, easy projects.
    This is all subjective, but then again, so is your opinion. An IDE is the best thing to do for a newbie.
    What do you think an IDE is, except a pretty face on a make file?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dev C++ Compiler, Indentation?
    By Zeusbwr in forum C++ Programming
    Replies: 3
    Last Post: 10-21-2004, 06:13 AM
  2. 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
  3. MSVC++ vs GCC compiler issue
    By WDT in forum C++ Programming
    Replies: 9
    Last Post: 01-04-2004, 01:07 PM
  4. Special Compiler for win app's
    By Unregistered in forum Windows Programming
    Replies: 19
    Last Post: 04-26-2002, 03:52 PM
  5. Compiler Issue
    By spd_dmn in forum C++ Programming
    Replies: 5
    Last Post: 01-16-2002, 01:29 PM