Notepad ++ NppExec plug execute c ++ program command

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/a3551736/article/details/79080464

First attach several related knowledge instructions link:

One of the NppExec ++ using Notepad: basic usage  (according to NppExec user guide creation)

cmd / c and cmd / k and the CMD  (distinguishing cmd / c and cmd / k)

Windows batch (cmd / bat) commonly used commands summary (& characters and pause, etc. statement usage presentation)

Painful experience:

Use NppExec plug-in to run the program is very pleasant, but encountered when multiple lines simultaneously input, the program found that Mo Mingka live, not output. 

At the same time when debugging, I met Chinese garbage problem.

Solution:

After learning and independent research and development, final order is as follows:

g++ -Wall -fexec-charset=GB2312 $(FULL_CURRENT_PATH) -g -o $(CURRENT_DIRECTORY)\$(NAME_PART).exe
npp_run cmd /c  $(CURRENT_DIRECTORY)\$(NAME_PART).exe  & pause

Pop-up window for the effect of the implementation of the program cmd is waiting for input, press any key to exit after the execution.

among them:

-fexec-charset=GB2312 
This code solves the problem of Chinese garbled coding can also be set to UTF8, (+ dorm) and (-dorm) the effect of seemingly different, I did not debugging.


Guess you like

Origin blog.csdn.net/a3551736/article/details/79080464