Author | Ubuntu 9.10 CodeBlock, odd erros |
Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | |
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
[CODE]sh: /home/sqwertle/C++/Untitled1: Permission denied
Press ENTER to continue.[/CODE]After getting this I [CODE]chmod a+x Untitled1[/CODE]After changing the file permissions it will compile, but then I get the following compile errors:
[CODE]
/home/sqwertle/C++/Untitled1: 3: using: not found
/home/sqwertle/C++/Untitled1: 5: Syntax error: "(" unexpected
Press ENTER to continue.[/CODE]The code I'm attempting to compile is as follows:
[CODE]#include <iostream>
using namespace std;
int main() {
cout << "hello world";
getchar();
return 0;
}[/CODE]
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. |
 |
Author | RE: Ubuntu 9.10 CodeBlock, odd erros |
stealth- Member

Posts: 1003 Location: Eh?
Joined: 10.04.09 Rank: Mad User | |
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://ubuntuforu. . .p?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)?
The irony of man's condition is that the deepest need is to be free of the anxiety of death and annihilation; but it is life itself which awakens it, and so we must shrink from being fully alive.
http://www.stealt. . .
Edited by stealth- on 06-03-10 23:11 |
 |
Author | RE: Ubuntu 9.10 CodeBlock, odd erros |
Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | |
I've tried that one already, it's a no go. Is there any more information I could supply that would be helpful? |
 |
Author | RE: Ubuntu 9.10 CodeBlock, odd erros |
Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | |
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. |
 |
Author | RE: Ubuntu 9.10 CodeBlock, odd erros |
stealth- Member

Posts: 1003 Location: Eh?
Joined: 10.04.09 Rank: Mad User | |
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.
The irony of man's condition is that the deepest need is to be free of the anxiety of death and annihilation; but it is life itself which awakens it, and so we must shrink from being fully alive.
http://www.stealt. . . |
 |