Topic: collect2.exe

I have quite suddenly began to get the following messages. Everything was fine then, after making a few program changes to fix an algorithm, this message comes on every attempt to build.

==============================================================================
Open Watcom Make Version 1.9 (Built on Feb  4 2013)
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
    "C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gfortran.exe" -c -o "build\Wavemod.o" -g -m32 -IC:/Users/johnti_adm/AppData/Local/sfpm/32/include  -Jmodules ".\Wavemod.f90"
    "C:\Program Files (x86)\Simply Fortran 2\fwin\wtouch.exe" -c "modules\waves.mod"
    "C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gfortran.exe" -c -o "build\Wavedata.o" -g -m32 -IC:/Users/johnti_adm/AppData/Local/sfpm/32/include  -Jmodules ".\Wavedata.f90"
    "C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gfortran.exe" -c -o "build\Wavenr.o" -g -m32 -IC:/Users/johnti_adm/AppData/Local/sfpm/32/include  -Jmodules ".\Wavenr.f90"
    "C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gfortran.exe" -o "Bose.exe" -m32 "build\Wavedata.o" "build\Wavemod.o" "build\Wavenr.o" -LC:/PROGRA~2/SIMPLY~1/MINGW-~1/lib/ -LC:/Users/johnti_adm/AppData/Local/sfpm/32/lib
c:/program files (x86)/simply fortran 2/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file Bose.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
Error(E42): Last command making (Bose.exe) returned a bad status
Error(F43): Deleting (Bose.exe): Permission denied
Error(E02): Make execution terminated

Re: collect2.exe

The important line in your error report is not the line referring to collect2.exe, but rather:

c:/program files (x86)/simply fortran 2/mingw-w64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file Bose.exe: Permission denied

It appears that the linker is unable to open Bose.exe, your target exectuable, for writing.

The most common reason for this error is that the executable, Bose.exe, is still running in the background.  I would suggest opening the Windows Task Manager and trying to locate the process.  After you kill the process, you should be able to proceed with compiling your executable.

Jeff Armstrong
Approximatrix, LLC