Thread: Newbie needs help, compiler won't compile

  1. #1
    Registered User
    Join Date
    Jul 2012
    Posts
    15

    Newbie needs help, compiler won't compile

    First off, I have next to no experience in C++ (although I know BASIC). I do all my programming offline on a computer with Windows ME, due to restrictions brought about by family (I'm 17). Because I use a Legacy OS, CodeBlocks won't work, so I use Dev-C++. But it won't compile my programs.

    I wrote a basic "Hello World" program:
    Code:
    #include <iostream>
    using namespace std;
    
    int main ()
    {
        cout << "Hello World!";
        wait;
        return 0;
    }
    *Note: Even if there is something wrong w/ my program, my problem still happens even when I use Dev-C++'s example programs.

    When I click compile, it opens a file dialog. I'm assuming it wants me to save my script, yes? After I save, the compiling window opens and it waits for a few seconds, but before it makes any progress, I get the following error message (word for word):

    The LIBGMPXX-4.DLL file is
    linked to missing export MSVCRT.DLL:___lc_codepage_func.

    I hate those words. I've seen them so often, I could quote them from memory.

    Can someone either explain this or give me a free version of XP so I can use CodeBlocks?
    PS I also found the ANSI version of Notepad++, so if someone could show me how to install some sort of compiler plug-in, that would work too.
    PPS Sorry I'm so long-winded

  2. #2
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Code:
    #include <iostream>
    using namespace std;
    
    int main ()
    {
        cout << "Hello World!";
        wait;
        return 0;
    }
    Get rid of the wait; line.

    Can someone either explain this or give me a free version of XP so I can use CodeBlocks?
    Here, Home | Ubuntu

  3. #3
    Registered User
    Join Date
    Jul 2012
    Posts
    15
    Still, even when I use the example programs, I run into the same problem.

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by future_engineer View Post
    Can someone either explain this or give me a free version of XP so I can use CodeBlocks?
    I'd rather see someone using an up-to-date version if they're going to upgrade anyway...
    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.

  5. #5
    Registered User
    Join Date
    Jul 2012
    Posts
    15
    wait, what? can you rephrase that?

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    IF you are going to upgrade, why upgrade to XP when Windows 7 is out? XP is over 10 years old.
    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.

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > The LIBGMPXX-4.DLL file is
    ...
    > RPM resource mingw32(libgmpxx-4.dll)
    This library is the Windows port of GNU arbitrary precision library.

    Since you're not using any GMP types, nor including any GMP header files, one has to wonder where it's getting the references to this library from?

    Dev-c++ is a pretty buggy in the IDE. Project files just seem to "rot" with the passage of time.
    Have you tried creating a NEW console project, with just that code?
    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.

  8. #8
    Registered User
    Join Date
    Jul 2012
    Posts
    15
    XP is the most recent software that's compatible with my computer.

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I'm pretty sure 7 will work on XP hardware, too.
    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.

  10. #10
    Registered User
    Join Date
    Jul 2012
    Posts
    15
    RE: Salem
    Have you tried creating a NEW console project, with just that code?
    i have no idea what you just said, but in response to that last question you asked: yes, but the problem had slightly different symptoms.

    The error message would appear, however instead of the compiling window closing, the progress bar would continue to grow. but when it was done, i would click "run" and it would say "The source file is not compiled", or something like that.
    *Note: I can't remember for sure, but I think the error message might have said something different when I did this.

  11. #11
    Registered User
    Join Date
    Jul 2012
    Posts
    15
    RE: Elysia
    Not so. I don't know what 7 requires, but Vista needs at least 800 MHz, my computer is 702 MHz. and again:

  12. #12
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    I think I might go for a re-install of dev-c++.

    Re: XP
    windows xp coa | eBay
    If you're prepared to wait a while, you might be able to get a cheap copy of XP with a good (not used) COA.

    Re: Ubuntu
    But if your hardware is capable of running XP, then I second manasij7479.
    Download Ubuntu 10.04.4 LTS (Lucid Lynx) (it's an older version, not so dependent on the latest hardware, like 12.04 is)
    Burn an ISO, and then reboot and choose the "try ubuntu" option which just runs from the CD.

    It's a good idea to make a really good backup of your windows machine at this point, if you're contemplating some kind of OS upgrade.
    A useful thing to do is buy a second hard disk of a similar size to the one you have; you should be able to pick up something pretty decent (tested and wiped) for say $30 or less.
    You can then freely install XP/Ubuntu/anything else on a separate disk and dual-boot your machine.
    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.

  13. #13
    Registered User
    Join Date
    Jul 2012
    Posts
    15
    RE: Salem
    I've already tried reinstalling dev-c++.

    as for the XP thing, backup. (remember, i'm a newbie)
    1) What's a COA?
    2) This is probably really obvious, but I'm not enitirely sure. Ubuntu is a different brand of OS (ie not windows), yes?
    3) What's an ISO?
    4) Remember, I'm 17, and I don't have a job. My budget is EXTREMELY LIMITED (aka non-existant). I'm waiting for a paycheck from a brief summer job which, after savings and such would yield me about $50 (and to me, that's a fortune). I have no way of making money after that.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Ubuntu is a Linux-type OS. Unless you technically minded (ie, love having control over stuff, not afraid of the command prompt, not afraid of editing files, etc), I definitely do not recommend using any Linux-type OS.
    That said, you can always try. It's free, so you don't lose anything. But you will most likely run into a lot of problems which you have to solve. Getting used to a new OS is definitely not easy.
    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
    Registered User
    Join Date
    Jul 2012
    Posts
    15
    ok, that will work. despite my newbie-questions, i'm am technically-minded (haven't you seen my username?)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help newbie compile program!
    By candysandra88 in forum C Programming
    Replies: 7
    Last Post: 12-13-2008, 11:27 PM
  2. Have no idea how to compile c++, please help (newbie qn)
    By rholloway in forum C++ Programming
    Replies: 3
    Last Post: 02-23-2008, 08:31 AM
  3. Replies: 14
    Last Post: 12-07-2006, 03:19 AM
  4. Can't compile on the other compiler
    By AProg in forum C Programming
    Replies: 8
    Last Post: 05-25-2003, 07:55 AM
  5. Won't compile, can YOU compile it on your compiler?
    By incognito in forum C++ Programming
    Replies: 12
    Last Post: 03-10-2002, 12:00 PM