MKGAURAB's blog

By MKGAURAB, history, 9 years ago, In English

Those who use sublime Text 3 for C++ coding in Ubuntu. This build system is for them https://github.com/ddxofy/SublimeTextSnippets/blob/master/G%2B%2B(For%20Ubuntu).sublime-build

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it +3 Vote: I do not like it

The terminal opens, but doesn't wait for user interrupt and closes instantaneously. What to do?

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    I have worked on that. Couldn't find any good solution though.

  • »
    »
    9 years ago, # ^ |
    Rev. 2   Vote: I like it +1 Vote: I do not like it

    I use this Build System in sublime-text-2 and works properly! I think it's OK with ST3!

    if that Build System doesn't work, another solution is to create a .sh shell script which compiles and runs your code!!

    PS: just simply add read -p 'Press any key to continue...' to the cmd string!

  • »
    »
    8 years ago, # ^ |
      Vote: I like it -22 Vote: I do not like it

    { "cmd": ["g++", "file", " - o", "{file_path}/{filebasename}"], "fileregex": "(..[: ] * ): ([0 - 9] + ): ?([0 - 9] + )?: ?(. * )", "working_dir": "{filepath}", "selector": "source.c, source.c +  + , source.cxx, source.cpp", "variants": [{"name": "Run", "shell": true, "cmd": ["gnome - terminal - e'bash - c"{file_path}/${file_base_name};echo;echo; echo Press ENTER to continue; read line;exit; exec bash"'"] } ]
    }

»
9 years ago, # |
  Vote: I like it +1 Vote: I do not like it

In each folder with source file there was Makefile also, and to run it I used this plugin.

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by MKGAURAB (previous revision, new revision, compare).