Problem with the compiler [message #781613] |
Sat, 21 January 2012 20:21 |
Missing name Mising name 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 #887100 is a reply to message #781613] |
Sat, 16 June 2012 03:41 |
Stephen Weppner 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.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03548 seconds