Info: Internal Builder is used for build
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o main.o "..\\main.c"
..\main.c: In function 'main':
..\main.c:73:17: warning: left-hand operand of comma expression has no effect [-Wunused-value]
gcc -o code_alex.exe main.o
c:/mingw/bin/../lib/gcc/mingw32/4.7.0/../../../../mingw32/bin/ld.exe: cannot open output file code_alex.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
14:45:27 Build Finished (took 546ms)
在eclipse中使用mingw編譯代碼的過程中,出現如上面所述的問題。
這個問題的根源在於之前debug或者run的過程中並沒有將code_alex.exe的可執行文件結束,重現編譯執行過程中便出現了上面的問題,新的進程和之前的進程衝突,新的進程便被拒絕了。
解決方案:
解決方案很多關鍵在於將之前的進程關閉。可通過重新調動debug窗口進行關閉,也可以通過任務管理器進行關閉。