Menu

Error Compiling help plz.

Adam C
2008-09-14
2012-09-26
  • Adam C

    Adam C - 2008-09-14

    I am kinda new at this, and to try to learn a little bit about C, I am reading "C for Dummies"

    I am making the very first program and when I compile I get an error. Code and error is below.

    CODE:

    include <stdio.h>

    int main()
    {
    printf("Goodbye, cruel world!\n!");
    return(0);
    }

    And this is what it says in the compile log.
    Compiler: Default compiler
    Executing g++.exe...
    g++.exe "C:\Users\Adam\Desktop\hello.cpp" -o "C:\Users\Adam\Desktop\hello.exe" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
    /mingw/lib/crt2.o(.text+0x167):crt1.c: undefined reference to `__cpu_features_init'
    collect2: ld returned 1 exit status

    Execution terminated

    Hopefully you can tell me what I am doing wrong so that I can continue to learn and make sure it does not happen again.

    Thank You

     
    • cpns

      cpns - 2008-09-15

      You did nothing wrong other than perhaps not searching the forum.

      https://sourceforge.net/forum/message.php?msg_id=4125109

      Also read the "PLEASE READ BEFORE POSTING A QUESTION" thread, because your next question will be "Why can't I see the output?" and teh question is answered there.

      I would avoid building on the desktop. A build can produce numerous intermediate files which will litter your desktop. Create a new folder for your projects.

      Clifford

       

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.