Menu

Compiler Error: In file included from...

xB33M4Nx
2008-08-04
2012-09-26
  • xB33M4Nx

    xB33M4Nx - 2008-08-04

    I have just started reading a "For Dummies" book on C++. The author starts out by showing you a Console Application. He uses this code:

    include <iostream>

    include <stdlib.h>

    int main(int argc, char *argv[])
    {

    system("PAUSE");
    return 0;
    }

    Which just produces a press any key to close or whatever....

    anyway, when I try to compile it to run it, i get an error on the first line saying...

    In file included from main.cpp

    Now this is a big deal because this is the base for everything he does in the book and I need to be able to run a program like this, any help?

     
    • cpns

      cpns - 2008-08-10

      "In file included from main.cpp " is not an error message. It is saying "In file included from main.cpp, the following errors were encountered...", the subsequent lines tell you (or use) what those errors are.

      Note you have to post the text from the "Compile Log" tab to provide a complete information, not the "Compiler" tab. It is a simple copy & paste, so requires little no effort on your part. Certainly less that you have expended so far fruitlessly repeating yourself.

      Note also that it takes one to know one, and in this case the publishers seem to have taken that line with that book. The author is a dummy. In this example the argv, argc parameters, and <iostream> header are entirely redundant.

      Clifford

       
    • Wayne Keen

      Wayne Keen - 2008-08-05

      Please do not simply excerpt the first line of an error message. Please provide us with your
      "Basic 3", they are covered in the thread titled "Please Read Before Posting Your Question".

      Based on the book you mention, I am afraid that the version is 4.9.7.0 - but let's get the data first.

      Wayne

       
    • xB33M4Nx

      xB33M4Nx - 2008-08-05

      1 C:\Dev-Cpp\main.cpp
      In file included from main.cpp

      and then a whole bunch of others that are on lines I havnt even typed yet

       
      • Wayne Keen

        Wayne Keen - 2008-08-05

        Posting the same message that I told you was not suffient again is a really bad way to go about getting help.

        PLEASE post your Basic 3. They are covered in the thread titled "Please Read Before Posting a Question".

        Wayne

         
        • Wayne Keen

          Wayne Keen - 2008-08-05

          Please note that the Basic 3 direction for copying and pasting the compile log mention specifically that if one has a ton of errors, post the log from the start throught the first 5 or so errors.

          I mention that, as version 4.9.7.0 had an issue that led to pages and pages of errors, and some people, especially if they have had to be asked to post this information, post all of it and ignore the above directions. (With, I suspect, a subtle note of "I'll show you, here's the whole blasted log")

          Please note that noone here had anything to do with that book, or its associated CD. Some versions of the CD come with version 4.9.7.0, which is one of the buggiest versions of Dev ever released.

          Finally, my asking for the Basic 3 is not to annoy you, or to make you jump through hoops as some sort of deranged power play - the point is to fix your problem. Simple as that.

          Wayne

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.