cc1 has stopped working [compiling and executing in notepad++]
I am trying to compile and execute c code using notepad++.
Below is the script i am using for NppExec.
NPP_SAVE
SET GCC = C:\cygwin\bin\gcc.exe
SET OBJ = $(CURRENT_DIRECTORY)\$(NAME_PART)
"$(GCC)" -c "$(FULL_CURRENT_PATH)" -o "$(OBJ).o"
"$(GCC)" "$(OBJ).o" -o "$(OBJ).exe"
"$(OBJ).exe"
UNSET OBJ
UNSET GCC
when I execute above script using F6.开发者_开发技巧 I get below messages.
# NPP_EXEC: "C_compile_execute"
# NPP_SAVE: E:\Cprograms\test.c
# SET: GCC = C:\cygwin\bin\gcc.exe
# $(GCC) = C:\cygwin\bin\gcc.exe
# SET: OBJ = E:\Cprograms\test
# $(OBJ) = E:\Cprograms\test
# "C:\cygwin\bin\gcc.exe" -c "E:\Cprograms\test.c" -o "E:\Cprograms\test.o"
# Process started >>>
# <<< Process finished.
# "C:\cygwin\bin\gcc.exe" "E:\Cprograms\test.o" -o "E:\Cprograms\test.exe"
# Process started >>>
# gcc: E:\Cprograms\test.o: No such file or directory
# gcc: no input files
# <<< Process finished.
# "E:\Cprograms\test.exe"
# CreateProcess() failed with error code 2:
# The system cannot find the file specified.
# - the user's variable has been removed: $(OBJ)
# - the user's variable has been removed: $(GCC)
# ================ READY ================
And I got a error in popup window like: "cc1 has stopped working"
However, I can compile and execute from commandline successfully.
E:\Cprograms>C:\cygwin/bin/gcc.exe test.c -o test.exe
E:\Cprograms>test.exe
Hello
E:\Cprograms>
I am using Windows Vista.
Please guide me on how I can I solve this problem.
You need to protect (escape or quote) the backslashes. Notice how the colon (the character after the backslash) is missing in the output, that's your hint.
加载中,请稍侯......
精彩评论