User forums > Help

Noob compiler problem

(1/2) > >>

mcmillinisillin:
I'm sure there is an explanation somewhere in this forum for my problem, but I just spent the last 2.5 hours looking here and the ret of the Internet and I just can't find a satisfactory answer.

I recently installed codeblocks and after finally figuring out that I apparently have to create a new project inside of a new project, which still makes no sense, I keep receiving an error message telling me that there is no such directory as iostream when I try to make the statement #include <iostream>. In addition, there is also an error message returned because of my next statement, using namespace std; which is according to codeblocks, is missing a series of characters between the words using and namespace. I am assuming that one of these problems is a direct result of the other but I just can't figure it out.

The code is as follows
#include <iostream >
using namespace std;

the error msgs read:
error: iostream : no such file or directory
error: expected '=', ',', ';', 'asm', or '__attribute__', before 'namespace'

I also have jcreator installed on my computer, any chance codeblocks could be searching the wrong library?

 

ollydbg:
Please carefully read this:
2.14 Q: How do I troubleshoot an compiler problem?

mcmillinisillin:
Thank you for the reply. After carefully reading the link you posted, I made the suggested adjustment and attempted to compile. However, the exact same error messages were returned. I had already assumed that woul happen bc those instructions could only lead me to the what of the problem, which I already know. The compiler doesn't understand what I'm telling it bc it can't find the library that came with the program. I need to know why this is happening.

Jenna:
Did you turn on full commandline logging, as mentioned in the link ollydbg has posted ?
If yes copy the content of the build log and paste it here.

By the way:please use code-tags to surround the code (and error messages) you post here (highlght the text and click on the hash-sign).

frithjofh:
I think it is as simple as removing the whitespace after iostream.

You wrote


--- Code: ---#include <iostream >
--- End code ---

but it should be


--- Code: ---#include <iostream>
--- End code ---

Mark the little difference.

Regards

frithjofh

Navigation

[0] Message Index

[#] Next page

Go to full version