Friday, October 26, 2012

Notepad++ NppExec plugin

[ Updated on 26th Oct]
Recently I downloaded Borland C++ Compiler 5.5 which is free. Unfortunately IDE is not free and we have to leverage on external editors.
I use notepad++ most of the time and thought of exploring it to use it to compile and run my C++ programs.

There is a plugin called NppExec. You can download and extract the dll to plugin directory.

Press F6 Function key and save the following script:

  1. npp_save
  2. CD $(CURRENT_DIRECTORY)
  3. C:\Borland\BCC55\Bin\bcc32.exe "$(FILE_NAME)"
  4. $(NAME_PART)

And if you want the program to run in its own window :

  1. npp_save
  2. CD $(CURRENT_DIRECTORY)
  3. cmd /c DEL "$(NAME_PART).exe"
  4. C:\Borland\BCC55\Bin\bcc32.exe "$(FILE_NAME)"
  5. NPP_RUN cmd /c "$(NAME_PART)"


Now whenever you need to compile and execute your cpp program it will be useful.
eg:


Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
NONAME.CPP:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
<<< Process finished.
NONAME
Process started >>>
Hello World !!
<<< Process finished.
================ READY ================
** Borland compiler is decade old better to go for another one :) Ref: wiki


No comments:

Post a Comment