Ubuntu 9.10 CodeBlock, odd erros
I've just recently come back to Ubuntu after a short XP stint and I decided I wanted a C++ compiler similar to Dev-CPP, CodeBlocks seems to be it. Every attempt at compiling code initially results in this error
Press ENTER to continue.```After getting this I ```markupchmod a+x Untitled1```After changing the file permissions it will compile, but then I get the following compile errors:
```markup
/home/sqwertle/C++/Untitled1: 3: using: not found
/home/sqwertle/C++/Untitled1: 5: Syntax error: "(" unexpected
Press ENTER to continue.```The code I'm attempting to compile is as follows:
```markup#include <iostream>
using namespace std;
int main() {
cout << "hello world";
getchar();
return 0;
}```
Upon each time a change is made to the program and I attempt to compile it, it gives me the permission denied error. I would not like to change permissions every time I attempt to compile. Also, if I've made a horribly stupid, blind-sighted mistake on the source, please let me know.
I was helping someone on a ubuntu IRC channel a few days ago who had a similar problem, but we managed to solve it with this forum: http://ubuntuforums.org/showthread.php?t=840445
The post of interest was the one by chinchillart. Perhaps that will be of use?
As for your code, that compiles fine for me with g++ on gentoo. Have you checked the obvious stuff (etc: gcc/g++ is installed, the file is .cpp, etc)?
Sqwertle wrote: I've fixed the problem at this point. While that thread didn't help, I found another that did. I forgot to install all of the correct components. This error was fixed by downloading the build-essential.
Ah, I thought it might have something to do with missing software, although I was thinking more along the lines of gcc. Glad you got it figured out.