3

I have installed NppExecute plugin in notepad++. I am not able to figure out next step to compile and debug C,C++ programs in Notepad++.

System Details: (a) Turbo C directory C:\TC (b) OS Windows 7

Please provide complete details on how to set Environment Variable and Scripts for Compiling and Debugging.

sandbox
  • 2,631
  • 9
  • 33
  • 39
  • 3
    are you from the past? XD (just kidding) – fortran Jan 12 '12 at 14:14
  • Use code::blocks. Its nice editor – Shiplu Mokaddim Jan 12 '12 at 14:15
  • 1
    @fortran Not as old as Fortran(1957).. hahahaaa – sandbox Jan 12 '12 at 14:17
  • [This](http://stackoverflow.com/a/8815693/968261) should help with compiling. You won't be able to debug from under Notepad++, though. And you don't need to configure environment variables unless you didn't install TC properly (as I recall, all you need is `C:\TC\BIN` in `PATH`). – Alexey Frunze Jan 12 '12 at 14:20
  • 1
    NppExec comes with a Help/Manual, especially read `Npp_Exec guide` it has example scripts and step by step instructions on how to compile programs. I used to use gcc and Notepad++ (still do sometimes a little), but after using MSVC2010 and Netbeans + gcc, I almost never use Notepad++ for C++ anymore (its still good for web programming though I think). – Jesse Good Jan 12 '12 at 14:34

2 Answers2

3

I wondering why somone wants to use turbo C++.If you run Windows, just use Visual Studio Express, or Dev-C++.If you still want to use Turbo C you will run into several problems with compatibility of this ancient software.

rkosegi
  • 14,165
  • 5
  • 50
  • 83
  • I am a php developer. I like coding in notepad++ :) – sandbox Jan 12 '12 at 14:13
  • @sandbox : You are PHP developer, but did you ever try eg, eclipse or other IDE instead of notepad++? By the way, I use notepad++, it's my favorite text editor, but you will NEVER create big project with just text editor, even if it's sophisticated.No offense, I just want to recommend correct way how to develop in C. – rkosegi Jan 12 '12 at 14:16
  • @Styne666: Yes, you're right this is also alternative, but has no IDE – rkosegi Jan 12 '12 at 14:17
  • @sandbox you can do that still. Just use any command line compiler. – Daniel Fischer Jan 12 '12 at 14:18
  • @rkosegi People have done big projects with just text editors. Now get off my lawn ;) – Daniel Fischer Jan 12 '12 at 14:20
  • @Daniel Fischer: Everything is possible, but show me productivity of development and application lifecycle management with your notepad or vim ;) – rkosegi Jan 12 '12 at 14:22
  • vim?? ed, ed is the only one ;) Jokes aside, of course one should use an IDE now that good ones are available. But people can do more things without advanced technology than is widely imagined. – Daniel Fischer Jan 12 '12 at 14:26
  • 3
    **The problem isn't the text editor, the problem is the compiler.** Yes, you can use any text editor you want, or even an IDE if it tickles your fancy (it tickles mine). That doesn't mean you can or should compile code written in this century with Turbo C++. – Cody Gray - on strike Jan 12 '12 at 14:31
3

Notepad++ has the run feature, but as far as I know it's unable to help you debugging (e.g. stepping through code, watching variables, etc.).

Your best bet would be using a simple batch file to compile the code and run your debug commands, but as far as I know you can't include everything into Notepad++ (i.e. it's no real C/C++ IDE).

Only option you've got is adding the created batch file as the program to be run by NppExecute.

Edit: Overall, as rkosegi suggested, if possible, use a more up-to-date toolchain.

Microsoft's Visual C++ Express Edition can be downloaded for free and used for private or commercial projects.

If you target cross platform code, it might be easier to use MinGW to use GCC/G++ under Windows.

Mario
  • 35,726
  • 5
  • 62
  • 78