Блог пользователя gagantheroyal

Автор gagantheroyal, история, 11 лет назад, По-английски

I am new to using Far Manager (http://www.farmanager.com/). I found it very helpful for managing files and editing. But when it comes to compiling and running programs I think we have to do many things manually similar to as while running programs from command line (as compared to using suitable IDE). Also I could not find any good tutorial (in English) for compiling, running and debugging c/c++ programs using Far. Could any one please explain how I can do these tasks (compiling, running and debugging) easily? i.e. with very less manual efforts?

Also it would be great to get an explanation (steps) for running interactive programs (having user interaction in command line for giving inputs to the program). You can also post some good links to tutorials (in English) explaining all these.

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

You can create file associations in Far Manager. Go to Menu (F9) -> Commands (C) -> File associations (A), then make a new file association (Insert):

Now, when you press Enter on a file, say, e.cpp, the command g++ -O2 -Wall -Wl,--stack=268435456 e.cpp -o e.exe will be executed. If all is well, the executable file e.exe will appear. For this to work, g++ must be already in your PATH. Otherwise, provide the full path, like C:\MinGW\bin\g++ instead of just g++.

Better integration (say, compile by pressing F9 in the editor) is also possible, but a bit more work to set up.

As for debugging, personally, I use debug output for debugging contest code. Not much integration needed.

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Whenever there is an infinte loop the Console screen gets stuck. Is there any way to set a timeout of few seconds.