Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Problem with the compiler
Problem with the compiler [message #781613] Sat, 21 January 2012 20:21 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 4
Registered: September 2011
Junior Member
When I try to compile this:
#include <iostream>
using namespace std;
#define SIZE 10

class stack{
	char stck[SIZE];
	int tos;
public:
	 void init();
	 void push(char ch);
	 char pop();
};

void stack::push(char ch)
{
	if(tos==SIZE){
		cout<<"Stakut e pulen";
		return;
	}
	stck[tos]= ch;
	tos++;
}
char stack::pop()
{
	if(tos==0){
		cout<<"Stakut e prazen";
		return 0;
	}
 tos--;
 return stck[tos];
}
int main()
{
	cout<<"dsadas";
	stack s1,s2,s3,s4,s5,s6,s7,s8,s9,s10;
    int i;
    s1.init();
    s2.init();
    s3.init();
    s4.init();
    s5.init();
    s6.init();
    s7.init();
    s8.init();
    s9.init();
    s10.init();
    int sd;
    for(sd=0; sd!=11; sd++)
    {
    	s1.push(i);
    	s2.push(i);
    	s3.push(i);
    	s4.push(i);
    	s5.push(i);
    	s6.push(i);
    	s7.push(i);
    	s8.push(i);
    	s9.push(i);
    	s10.push(i);
    }
}

I get this error
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot open output file first.exe: Permission denied
Where is the problem?
Re: Problem with the compiler [message #782252 is a reply to message #781613] Mon, 23 January 2012 12:14 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Quote:
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot open output file first.exe: Permission denied

You have no right to create the file first.exe. Either you have no rights to create a file in the output folder or you have first.exe still running and want to overwrite it.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Problem with the compiler [message #804817 is a reply to message #782252] Thu, 23 February 2012 02:57 Go to previous messageGo to next message
no one is currently offline no oneFriend
Messages: 1
Registered: February 2012
Junior Member
I have this problem ,too!
I'm sure that there isn't runing binary-file. The first time I compile my project, it's successful and it run well. But when I had modified the code, this error appear.
I use Windows 7 64bit, thanks for any help Smile
Re: Problem with the compiler [message #887100 is a reply to message #781613] Sat, 16 June 2012 03:41 Go to previous messageGo to next message
Stephen Weppner is currently offline Stephen WeppnerFriend
Messages: 1
Registered: June 2012
Junior Member
I was having the same problem too and it was driving me crazy:

Windows7 64 bit, MinGW, MinSys, Eclipse, CDT

Permission denied errors, executable disappearing, ld.exe errors. It would work once, but never again.
Statements like: "ld.exe: cannot open output file ***.exe: Permission denied"


Do what others tell you : set your path variable in the control panel.

BUT if it is still happening, check your ANTIVIRUS Software. I use Bitdefender. It was erasing the executable on the fly and would then make the directory un-writable, hence the permission denied errors. FRUSTRATING!

In Bitdefender I just made sure the workspace was off-limits to the antivirus software, other Antivirus programs offer the same options.

Once I turned off my Antivirus software in workspace then cleaned the workspace and started the project over again I never had the problem again.
Re: Problem with the compiler [message #888100 is a reply to message #887100] Sun, 17 June 2012 17:38 Go to previous message
Step O is currently offline Step OFriend
Messages: 4
Registered: June 2012
Junior Member
This drove me nuts too, but turns out, the error-code was "me".

If it still persists:

Click on "window", "open perspective" and then "debug".

If there is a thread still running in the top-left window, click it and stop it.

You can also stop your programs in the console. Do that before trying to recompile.

Hope that helps.
Previous Topic:Latest cygwin toolchain not found in eclipse
Next Topic:Configuring eclipse to use Microsoft Visual C++ Toolchain?
Goto Forum:
  


Current Time: Wed Apr 24 22:56:06 GMT 2024

Powered by FUDForum. Page generated in 0.03548 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top