본문 바로가기

소프트웨어/C++

NppExec + git bash + GCC

Npp에서는 다음과 같이 설정해준다.

gcc -o "$(CURRENT_DIRECTORY)\$(NAME_PART)" "$(FULL_CURRENT_PATH)" 
cd "$(CURRENT_DIRECTORY)" 
cmd /c start "Git Bash" "$(NAME_PART).exe" --login -i

 

간혹 콘솔에서 정상 작동을 하지 않는 경우 다음 라인을 추가해준다 (printf 등)

/* 
 * Prevent immediate closing execution window. 
 * (only works in Windows system) 
 * Add it above the return statement in main function!
*/
system("pause");