Configuring include path for VS Code || Json file for VS Code || Limitless Playing

 Hey Guys This is Limitless Playing.

In this blog, I am going to teach you how to configure the include path or edit the JSON file for VS Code. In order to properly function the include path, you must have installed MingW on your PC, and also you should have configured its path in the environment variable of your PC. If you also have a problem running the program in the terminal then I have a separate one for that please have a look. If you have already done this then 

  • Open VS Code.
  • Open your program or write a program.
  • You will get an error, Right-click in the include and click in the Edit Include Path Setting.
  • There you will see a JSON file.

Method 1

  • Add the location of " gcc " folder of MinGW between the brackets of " includePath " in VS Code as shown below in the image. If you get an error then add a slash between every directory. 
Eg: "includePath":[
 "C:\\MinGW\\lib\\gcc\\mingw32\\9.2.0"
]
  • Do not forget to remove " compilerPath " from there. Make sure it is same as shown below.
  • Save the JSON file.
  • And now you will be able to run your program.

Method 2

  • Add the location of the " bin  " folder of MinGW in the " compilerPath " of the JSON file and do not forget to add " .exe " at the last as shown below.
  • Eg: "compilerPath": "C:\\MinGW\\bin.exe"
  • Save the JSON file.
  • You will now to able to run the program.
  • If you are still getting errors even after doing these things then update your VS Code and MinGW.
--------------------------------------
I hope your problem is solved. Please do not forget to message us on our social media if you have any problems and need any help on this topic.
--------------------------------------
Thank you for coming here and reading our blog.
If this works then please Leave a comment.
Please visit our youtube channel also.


Post a Comment (0)
Previous Post Next Post

Advertisement