User forums > Help
Compiler Errors None work at all
Coaster3000:
My specs
OS: XP service pack 3 Professional.
Code::Blocks 10.05.
REV 6283
I keep on getting errors when trying to compile anything. at all even the basic hello world app..
--- Code: ---||=== cppirc, Debug ===|
ld.exe||cannot find -lwxmsw29ud|
||=== Build finished: 1 errors, 0 warnings ===|
--- End code ---
that one is for the minGW thing...
But there where other errors too.
Here is what im compiling on the hello world
--- Code: ---C:\Documents and Settings\Chris\My Documents\CPPirc\cppIRC\main.cpp||In function 'int main()':|
C:\Documents and Settings\Chris\My Documents\CPPirc\cppIRC\main.cpp|8|error: 'cout' was not declared in this scope|
C:\Documents and Settings\Chris\My Documents\CPPirc\cppIRC\main.cpp|8|error: wrong type argument to unary minus|
C:\Documents and Settings\Chris\My Documents\CPPirc\cppIRC\main.cpp|9|error: expected ';' before 'return'|
||=== Build finished: 3 errors, 0 warnings ===|
--- End code ---
--- Code: ---#include <iostream>
#include <string>
#include <ctime>
int main()
{
cout <- "Hello World"
return 0;
}
--- End code ---
It won't run at all.
stahta01:
Fix decide if you are going to do C or C++. I am guessing C++ because of cout.
Next, add the missing ";" after the cout line. And change "<-" to the correct symbol!
http://www.cplusplus.com/doc/tutorial/program_structure/
NOTE: This is not a site to learn programming!!
Tim S.
Coaster3000:
it still won't compile with that. i took that code out and left it with a return it would not compile. Ok if that was an error even if fixed it will not compile! Do not accuse me of it not compiling. its something wrong Not with the app. its some kind of settings i need help with. I am sure its settings. as i used the minGW compiler combo pack from here. Also tried installing the latest version which seems to not work!
Ld.exe fails to run properly within code blocks it is my guess
as a matter of fact here is the error again with it all fixed from that page
--- Code: ---#include <iostream>
#include <string>
#include <ctime>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
--- End code ---
--- Code: ---||=== cppirc, Debug ===|
ld.exe||cannot find -lwxmsw29ud|
||=== Build finished: 1 errors, 0 warnings ===|
--- End code ---
oBFusCATed:
Read here: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Coaster3000:
doesn't help does not fix my problem
here is log by the way
--- Quote ---Build started on: 11-08-2010 at 14:57.11
Build ended on: 11-08-2010 at 14:57.12
-------------- Build: Debug in cppirc ---------------
mingw32-g++.exe -LC:\wxWidgets-2.9.1\lib\gcc_dll -L"C:\Documents and Settings\Chris\My Documents\Dev Packs (CodeBlocks)\lib" -o bin\Debug\cppirc.exe obj\Debug\main.o -mthreads -lwxmsw29ud -mwindows
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw29ud
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings
--- End quote ---
Navigation
[0] Message Index
[#] Next page
Go to full version