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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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