When I compile/run my .cpp
script, I am not seeing any output in Sublime Text 3. I am trying to use Sublime Text 3
as my main code editor for C++ scripts. I’ve edited my .sublime-build
to include the folders needed, and defined the library folders as well. My .sublime-build
file is as follows:
{
"cmd": ["g++", "-Wall", "-Wextra", "-std=c99", "${file}", "-o", "${file_path}/${file_base_name}", "-I", "C:/Program Files/ArrayFire/v3/include", "-I", "C:/Program Files/ArrayFire/v3/include/af"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
"shell_cmd": "g++ \"-Wall\" \"${file}\" -o \"${file_path}/${file_base_name}\" -I \"C:/Program Files/ArrayFire/v3/include\" -I \"C:/Program Files/ArrayFire/v3/include/af\" -I \"C:/package/armadillo74002/include\" -L \"C:/Program Files/ArrayFire/v3/lib\""
}
]
}
However, when I run my script, I only get the following output: [Finished in 1.3s]
. My code is simple, and is shown below:
#include <iostream>
#include "arrayfire.h"
using namespace std;
int main(){
cout << "Check" << endl;
return 0;
}
Additionally, when I run the .exe
file, it closes immediately. Both of these suggest to me that something isn’t correct, but I cannot seem to find my error.