Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

GCC/G++ command not recognised in VS Code but recognised in command prompt

Go to solution Solved by BobVonBob,

Run VS Code from a terminal (Command Prompt, PowerShell, etc.) using the command "code". That should refresh the environment variables, then you can run it from any shortcuts you already had.

Hi. I have installed MinGW on my machine and added it to my PATH, and the commands work in command prompt but in VS Code they are not recognised:

 

VS Code:

jdw3ANBOC6.png

 

Command Prompt:

IR0vefkBOH.png

 

My environment variables:

image.png.87ed19087c7badde23227d7229865884.png

 

How come this doesn't work?

CPU: Intel Core i7 8700  

GPU: Gigabyte GeForce GTX 1070

MOBO: ASUS Z370-F STRIX  

RAM: 16GB Corsair Vengeance DDR4 2133MHz

Link to post
Share on other sites

Run VS Code from a terminal (Command Prompt, PowerShell, etc.) using the command "code". That should refresh the environment variables, then you can run it from any shortcuts you already had.

¯\_(ツ)_/¯

 

 

Desktop:

Intel Core i7-3820 | Corsair H100i | ASUS P9X79-LE | 16GB Patriot Viper 3 1866MHz DDR3 | MSI GTX 970 Gaming 4G | 2TB WD Blue M.2 SATA SSD | 2TB Hitachi Deskstar HDD | 1TB WD Black HDD | Corsair CX750M Fractal Design Define R5 Windows 10 Pro / Linux Mint 20 Cinnamon

 

Laptop:

Dell XPS 15 9560 4K Touch | Intel Core i5-7300HQ | 12GB Generic (Crucial?) 2133MHz DDR4 | Nvidia GTX 1050 | 256GB Toshiba M.2 NVMe SSD | Windows 10

Link to post
Share on other sites
2 minutes ago, BobVonBob said:

Run VS Code from a terminal (Command Prompt, PowerShell, etc.) using the command "code". That should refresh the environment variables, then you can run it from any shortcuts you already had.

Thank you!

CPU: Intel Core i7 8700  

GPU: Gigabyte GeForce GTX 1070

MOBO: ASUS Z370-F STRIX  

RAM: 16GB Corsair Vengeance DDR4 2133MHz

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×