Now I am getting this error when compiling

I guess there is something wrong with the setup in the IDE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  Compiling single file...
- Filename: C:\Documents and Settings\ALISON STUDENT\My Documents\ZolaMndeni\Recusion\writebackwards.cpp
- Compiler Name: TDM-GCC 4.9.2 32-bit Release

Processing C++ source file...
--------
- C++ Compiler: C:\Program Files\Dev-Cpp\MinGW64\bin\g++.exe
- Command: g++.exe "C:\Documents and Settings\ALISON STUDENT\My Documents\ZolaMndeni\Recusion\writebackwards.cpp" -o "C:\Documents and Settings\ALISON STUDENT\My Documents\ZolaMndeni\Recusion\writebackwards.exe" -m32 -I"C:\Program Files\Dev-Cpp\MinGW64\include" -I"C:\Program Files\Dev-Cpp\MinGW64\x86_64-w64-mingw32\include" -I"C:\Program Files\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include" -I"C:\Program Files\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++" -L"C:\Program Files\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib32" -static-libgcc -m32
C:/Program Files/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file C:\Documents and Settings\ALISON STUDENT\My Documents\ZolaMndeni\Recusion\writebackwards.exe: Permission denied
collect2.exe: error: ld returned 1 exit status


Compilation results...
--------
- Errors: 1
- Warnings: 0
- Output Filename: C:\Documents and Settings\ALISON STUDENT\My Documents\ZolaMndeni\Recusion\writebackwards.exe
- Output Size: 1.30218410491943 MiB
- Compilation Time: 1.28s

This is a very simple program:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include<iostream>
using namespace std;
void write_backwards(int n);
int main()
{
	write_backwards(10);
	return 0;
}
void write_backwards(int n)
{
	if(n >= 1)
	cout << n << " ";
	write_backwards(n - 1);
}

Even a simple Hello World program does not run:
1
2
3
4
5
6
7
8

#include<iostream>
using namespace std;
int main()
{
    cout<<"Hello World!!!!";
    return 0;
}

I get :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Compiling single file...
- Filename: C:\Documents and Settings\ALISON STUDENT\My Documents\ZolaMndeni\Recusion\test.cpp
- Compiler Name: TDM-GCC 4.9.2 32-bit Release

Processing C++ source file...
--------
- C++ Compiler: C:\Program Files\Dev-Cpp\MinGW64\bin\g++.exe
- Command: g++.exe "C:\Documents and Settings\ALISON STUDENT\My Documents\ZolaMndeni\Recusion\test.cpp" -o "C:\Documents and Settings\ALISON STUDENT\My Documents\ZolaMndeni\Recusion\test.exe" -m32 -I"C:\Program Files\Dev-Cpp\MinGW64\include" -I"C:\Program Files\Dev-Cpp\MinGW64\x86_64-w64-mingw32\include" -I"C:\Program Files\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include" -I"C:\Program Files\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++" -L"C:\Program Files\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib32" -static-libgcc -m32
C:/Program Files/Dev-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file C:\Documents and Settings\ALISON STUDENT\My Documents\ZolaMndeni\Recusion\test.exe: Permission denied
collect2.exe: error: ld returned 1 exit status


Compilation results...
--------
- Errors: 1
- Warnings: 0
- Output Filename: C:\Documents and Settings\ALISON STUDENT\My Documents\ZolaMndeni\Recusion\test.exe
- Output Size: 1.30218029022217 MiB
- Compilation Time: 4.14s

what is this Perssion denied thing????
Try to use another directory for the .exe. Maybe the compiler locked the source directory against writing while compiling.
Some possible causes of trouble.
1. You're already running writebackwards.exe and it hasn't quit yet.
2. Your anti-virus has detected an unknown exe and locked it.

Speaking of AV, it's probably worth adding an exclusion rule to your entire C:\Users\Documents\Code directory (well, whatever your code root directory is anyway).

> - Output Size: 1.30218029022217 MiB
LOL - 15 digit precision on a 7 digit number.
That 0.29 of a byte is really gonna mess you up!
Topic archived. No new replies allowed.