Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[G++] Can't execute a selfmade program [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Aries-Belgium
l33t
l33t


Joined: 08 Jul 2005
Posts: 730
Location: Willebroek, Belgium

PostPosted: Wed Sep 21, 2005 2:00 pm    Post subject: [G++] Can't execute a selfmade program [SOLVED] Reply with quote

Hi, I've got a really strange problem.
I created a program from a tutorial:
Code:
#include <iostream>

using namespace std;

int main(){
        cout << "hello";
        return 0;
}

They said I have to compile it with G++:
Code:
g++ -o test test.cpp

Okay so far so good, it compiles without getting errors and it outputs the file "test".
Now the strange part. When I want to execute the the file with "./test" it sais "bash: ./test: Permission denied".
Even with root I get the same error. I just followed the tutorial I found on the Internet, so I guess this have to work ...

Any ideas?


Last edited by Aries-Belgium on Wed Sep 21, 2005 2:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
skunk
l33t
l33t


Joined: 28 May 2003
Posts: 646
Location: granada, spain

PostPosted: Wed Sep 21, 2005 2:13 pm    Post subject: Reply with quote

the filesystem where resides test is probably mounted noexec, remount it with exec (man mount)
Back to top
View user's profile Send private message
Aries-Belgium
l33t
l33t


Joined: 08 Jul 2005
Posts: 730
Location: Willebroek, Belgium

PostPosted: Wed Sep 21, 2005 2:21 pm    Post subject: Reply with quote

skunk wrote:
the filesystem where resides test is probably mounted noexec, remount it with exec (man mount)


Jep, that was the problem. Thanks!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum