Windows 10\Windows Defender: Code blocks

i'm using Windows 10 with Code Blocks...
if i disable the Windows Defender, the compiler can create the exe... else i will get these error:
"ld.exe||cannot open output file bin\Debug\testfolder.exe No such file or directory|"

i belive the Windows Defender, think that the compiled exe is a virus... can i avoid these problem?
Have a particular tree of directories that you build code under, and add that directory to the list of exclusions.
https://support.microsoft.com/en-us/help/4028485/windows-10-add-an-exclusion-to-windows-security
Ganado: i did that:
heres the compiler folder:
"C:\Program Files (x86)\CodeBlocks\mingw64"
heres the project folder:
"C:\Users\Joaquim Jesus\Documents\CB"
now the project exe is created without delete it.
i execute the compiled project... the compiled project create 2 files(*.cpp and *.vcb)(the project sub folder)... but the Defender delete it too :(

https://imgur.com/SGzL9nf

it's Portuguese, but you get the point
Assuming all your projects are written under Documents\CB, sorry but I don't see a clear solution. Maybe someone else might know. It's always just worked for me.

Maybe try adding that file specifically. I'm not sure if you can add a file if it doesn't already exist. But try adding the file you want to exclude directly, in advance before compiling it.
"C:\Users\[User name]\Documents\CB\[My Project]\bin\Debug\testfolder.exe"

Edit: I just thought of this. gcc/mingw might also be creating temporary files inside your %APPDATA%, or another temporary folder. I'm not sure exactly where those are...

________________________________________

Also, it might if we can narrow down the issue.
First thing would be: Does the bin\Debug\testfolder.exe actually exist (regardless of the error)? Did you check?
If it does exit, it might be because your anti-virus or another program is holding onto the file, preventing you from modifying it.

https://stackoverflow.com/questions/6875403/cannot-open-output-file-permission-denied/6875488

If it doesn't, is that .exe showing up in quarantined items in your anti-virus?

Last edited on
i added the exe file and works now....
but if i do the same on another project(creating a new file, i must add that exe file name too).
now i can create projects using GCC compiler... we must add the permited program:
ld.exe and x86_64-w64-mingw32-g++.exe from GCC bin folder.
but my program need create new files, so i must add it too: testfolder.exe
now works fine.. the problem is that i don't understand 2 things:
- how can i add a file type? it's "*.cpp" or ".cpp" or just "cpp"?
- how can i add a permited folder instead a file name? what i mean is that i have 1 folder for all projects and some projects can create a new files
Topic archived. No new replies allowed.