Compile and run c++ code in a new terminal window? - sublimetext2

How can I make sublime compile and run my c/c++ code and open the output program in a new terminal window like what happens when I use an ide such as code blocks?

Glue plugin can do what you want.Check it out:
http://gluedocs.readthedocs.org/en/latest/

Related

VS Code linking launch configuration to commands from command pallete

I am trying to make a VS Code extension where the launch.json would have launch configurations that link to the command palette.
Specifically, I have registered commands using vscode.commands.registerCommand("CommandA"). Is there a way to make it so that the launch.json would direct to "CommandA"?
EDIT: I basically want to run a command from package.json
You can use have a launch configuration run a registered command from the command palette using command variables.

running java program in IntelliJ terminal

Below is a screenshot of IntelliJ on my computer with a terminal up.
I thought I should be able to just type java random_uniformin the terminal to run the program but it complains withe the error message shown in the screenshot.
I have looked at similar questions to mine but still wasn't able to resolve the issue.
The terminal in IntelliJ is just your shell (if you're on unix) and cmd.exe-like command prompt (if you're on Windows). There's no magic.
So to run program in terminal you need to compile it as usually and run binary.
Here is an answer about how to compile Java program

octave opens GUI when I type "octave" in terminal

I have a problem:
installed octave and do not know why, every time I type octave in the terminal opens the GUI interface (gui --force-octave) Octave and not the terminal octave as is right. how can I fix this?
If you have Octave 4.0, the GUI is the default:
** A graphical user interface is now the default when running Octave interactively. The start-up option --no-gui will run the familiar command line interface...
https://www.gnu.org/software/octave/NEWS-4.0.html
You can add this alias octave='octave --no-gui' to your ~/.bashrc file and every time you type octave, it opens in your terminal.
Good luck

How to configure Xcode to compile not supported language, e.g. Fortran?

I would like to use Xcode under Mac OS X to compile and run a program written in a language that is not supported, e.g. Fortran. Assuming I have a compiler installed, e.g. gfortran or ifort, what are the steps in the Xcode project settings to make it possible to compile and run the program?
I have created an new, empty project since Fortran is not supported (only C,C++,Objective-C and Swift are selectable in a command line tool application). I created a simple Fortran file. But now I guess I have to add several things to the Builds tab in the project settings to make it compile and run (it works from the command line). What are these steps?
Add an external build system target to your project. External build system targets/projects let you build projects in languages Xcode doesn't natively support. The external build system target/project is in the Other section under OS X on the left side of the assistant. When you click the Next button, you'll be asked for the location of the build tool. Enter the path to your Fortran compiler. When you build the project, Xcode will use the Fortran compiler to do the building.

How to compile source file

I really love Sublime Text 2 and I want to use it for Software programming.
The problem is that our source files are stored on a Linux server and we all work using PuTTy to connect and Vim to edit the code. We can compile the source by executing a command in PuTTy.
I want to use Sublime Text 2 for coding (the folders in Linux are mounted on our Windows system so the files can be opened in Windows). But whenever I want to compile, I have to open PuTTy and compile manually which asks a lot of time. Can I automate this somehow? Like if I push a button (F8 for example) then PuTTy opens, connects to the Linux server with SSH goes to the correct folder and compiles the source file. Is this possible?
Thanks for any help!
Sublime Build Systems can be used to launch a process like this.
I'm not sure if you can automate anything using putty. But the fork named ExtraPutty allows this: it is scriptable using Lua, an you can launch a script from command line.
If you arefamiliar with Javascript, another alternative would be to use Grunt + a module like SSH2 to automate you compilation process, then launch it from a Sublime build system. The ssh module does not allow interactive commands to be scripted, so I recommend you to use SSH2.
There are many other options; pick the one with which you're the more confortable, then use Sublime Build system to launch it.