Topic: Build | Launch Fails but...

There is only one Fortran source code file in the project.

When I try Build | Build Project , I get

Compiling .\SudokuBruteForce.f90
Generating target.exe
c:/program files/simply fortran 2/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
cannot open output file target.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
Error: Last command making (target.exe) returned a bad status
Error: Deleting (target.exe): Permission denied
Error: Make execution terminated

* Failed *
! -------------------------------------------------------------------
When I try   Compile and Run Current File    I do get a a clean compile and execution occurs.
                                And all is fine.

Any ideas as to why Build Project fails ?
Bob

Re: Build | Launch Fails but...

Bob,

The linker is unable to open the project's target executable, target.exe, for writing.  This situation usually occurs for one of two reasons:

1. The executable target.exe is still running

2. Antivirus software is blocking the operation

The first can be easily checked by opening the Windows Task Manager and looking for target.exe under the "Details" tab.  If you find it running, select it and click "End Process."

The second situation is more difficult to deal with often, but it might not be your situation since "Compile and Run Current File" seems to work just fine.  What antivirus software are you running?  Sometimes you can add your Fortran development directories to a whitelist to avoid the antivirus software getting in the way.

Jeff Armstrong
Approximatrix, LLC