Final Setup of gcc in Notepad++ [using nppexec]

ぃ、小莉子 提交于 2020-01-03 02:59:07

问题


I downloaded notepad++, and MinGW also I installed the nppexec plugin in order to use npp as fully functional IDE.

the command i entered into the nppexec is

npp_save
cd $(FULL_CURRENT_PATH)
gcc -o $(NAME_PART) $(FILE_NAME)
$(CURRENT_DIRECTORY)\$(NAME_PART).exe

now, every time I hit "f6", it lets me to set the command, every single time, how do i stop it? I want to do that if I press F6 the command automatically be executed

second question.

my code, 4 example is:

printf("please enter num\n\n");
int a,b,c;
scanf("%d%d", &a, &b);
c=a+b;
printf(" %d+%d equals %d", a, b, c);

but the output is in wrong order, first it asks for the scanf character and them prints out the FIRST message

1 3
please enter num

 1+3 equals 4

Thank you for the help, Samyon.


回答1:


You might use the commands npp_save and npp_run:

npp_save
cd "$(CURRENT_DIRECTORY)"
cmd /c del "$(NAME_PART)".o "$(NAME_PART)".exe *.o
gcc -o $(NAME_PART) $(FILE_NAME)
npp_run "$(NAME_PART)".exe

NPP_RUN is the key here.



来源:https://stackoverflow.com/questions/22730556/final-setup-of-gcc-in-notepad-using-nppexec

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!