I have a feeling that's going to be the hardest part.
Any tips for the future?
tcsoccerman - Fri Feb 01, 2008 3:42 pm
Post subject:
you caqn also try the help file in devcpp. it's at help menu in the menustrip.
Anonymous - Fri Feb 01, 2008 6:31 pm
Post subject:
I'm having a terrible time getting anything to work in Dev-C++. When I go to compile even the simplest program from a tutorial, it gives me a write "Error 1".
I don't know what the hell happened to it, but it used to work fine.
Can you recommend any other programs?
CypherJF - Fri Feb 01, 2008 6:57 pm
Post subject:
Error 1?
Could you copy the compile logs?
Anonymous - Fri Feb 01, 2008 7:59 pm
Post subject:
Sure, here.
Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\Owner\Desktop\C++\Makefile.win"
Executing make...
make.exe -f "C:\Documents and Settings\Owner\Desktop\C++\Makefile.win" all
g++.exe -c Untitled1.cpp -o Untitled1.o -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"
Untitled1.cpp:1:10: #include expects "FILENAME" or <FILENAME>
Untitled1.cpp:2: error: expected unqualified-id before '<' token
Untitled1.cpp:2: error: expected `,' or `;' before '<' token
make.exe: *** [Untitled1.o] Error 1
Execution terminated
|
CypherJF - Fri Feb 01, 2008 8:03 pm
Post subject:
And your Untitled1.cpp file?
Obviously, it's pointing at line 10; something you have with your #include statement isn't what it's expecting.
Anonymous - Fri Feb 01, 2008 8:45 pm
Post subject:
Ok, well.. I copied it directly from a tutorial and it says it's a working program.
See here: http://www.cprogramming.com/tutorial/c/lesson1.html
#include
<stdio.h>
int main()
{
printf( "I am alive! Beware.\n" );
getchar();
return 0;
}
|
and yes, Untitled1.cpp.
tcsoccerman - Fri Feb 01, 2008 8:55 pm
Post subject:
i don't know if this is how it is in the file, but try having
#include <stdio.h>
instead of
#include
<stdio.h>
Anonymous - Fri Feb 01, 2008 9:40 pm
Post subject:
Heh, that did it.
Thanks a lot.
I'm gonna take a look at the tutorials you guys posted and if I have any more questions, I will post here.
Animate Dreams - Wed Feb 06, 2008 5:37 pm
Post subject:
Yeah... anything that begins with # is a preprocessor or precompiler directive iirc, and all directives like that have to be on one line, and aren't ended with semicolons. It's not really being compiled, it's translated before the actual compilation. Just FYI.