Sublime Forum

Build Error

#1

Every time I try to run the code whether its c++ or python even after setting build system as the respective language this error pops up:
‘g++’ is not recognized as an internal or external command,
operable program or batch file.
[Finished in 0.1s with exit code 1]
[shell_cmd: g++ “C:\Program Files\Sublime Text 3\test.cpp” -o “C:\Program Files\Sublime Text 3/test”]
[dir: C:\Program Files\Sublime Text 3]
[path: C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files\Windows Live\Shared;C:\TCWIN45\BIN]

I have seen a few solutions where the directory is changed by finding the build file but I cannot find the said file.

0 Likes

#2

The compiler binary (g++.(cmd|bat|exe) for GNU C++ Compiler, python.exe for Python) must be in your path.
Open a command prompt and type:

g++

You will very likely have the same error.

Add your GNU C++ Compiler path to your system path (and Python path too).

0 Likes

#3

Yes but that’s what i don’t know how to do.

0 Likes

#4

computerhope.com/issues/ch000549.htm

But I suspect your problem is not really ST.

Do you have a C++ compiler on your computer ?
Do you have Python installed on your computer ?
Is compiling/running from the command prompt works on your computer ?

If you don’t exactly know what I mean, you probably have to search internet for a tutorial on how programming C++/Python first, it will probably tell you how to install and configure your development environment.

0 Likes

#5

Before starting with Sublime Text i was already using turbo c++ and the python version from the official website so yes i am pretty sure the compiler is there. Also the error showed in the command prompt too.

0 Likes