No build task to run found...error message

I checked and double-checked my typing and I found no errors when matched against what the video shows. Yet when I went to “Terminal>Run Build Task…” I get the error message," No build task to run found. Configure build task…"

Stuck once more!!!

When I started over something really weird happened. As I typed the first line no color appeared. For example, the first time I typed it the letters int were in blue. and the #include was a deep pink color. the second time typing it out everything remained white. No colors.

I uninstalled VS Code and reinstalled it…but the same thing…no more colors.

Seems the harder I try the more I mess it up. Not having a good day with this course.

@mwsheeler Michael I Have a two-part response for you.

My first question is, when you did the step in Lecture 2 after cloning VSCode Template (vscode-template) somewhere, did you do the step “Terminal | Configure Default Build Task …” and it set compiler: C:\raylib\mingw\bin\g++?.

That brought up a tasks.json file that had additions made to it. You needed to have saved that file, (Ctrl+S) as a precaution. This put it back into the .vscode folder inside of the cloned vscode-template folder.

If you are not certain, go right-click on the vscode-template folder in Windows Explorer and specify “Open with Code”. You can check that the above choice is already set for Configure Build … and if not, set it again. Then be certain to save the tasks.json via Ctrl+S.

@mwsheeler Miichael, now part 2. Have the folder vscode-template open in Windows Explorer and have the (empty) folder where you put hello.cpp also open in a separate Window. Copy the vscode-template/.vscode folder and paste in into the same folder that has your hello.cpp. (E.g., for me that was D:\giocchi\Udemy-C++FundamentalsGameDev\S1E4-Project.) Open that folder in VS Code.

When that shows up the Explorer sidebar should show hello.cpp and also the .vscode folder there. Now Terminal | Configure Default … should report that you are already configured for C/C++ : g++.exe … .

If you made it to this point, now do "Terminal | Run Build Task … "
If you get the message “Build finished successfully” hello.exe will be in your folder next to hello.cpp but VS Code does not show it. The Terminal window shows a command prompt (beginning with PS). To the right of the > of the prompt, type ./hello.exe and hit Enter. You should see your 1-line Hello message and a new prompt.

Hi orcmid,

Sure appreciate your taking the time to help me troubleshoot this. I have enclosed three screen grabs. the first with the all white text but shows all the files in the left column.

Then I saw part 2 of your messages. When I checked the file folder structure in Windows Explorer the Hello.cpp definitely has the vscode-template folder in there. As you can see in the screen grab showing the explorer window.

I double-clicked on the hello.cpp file and it opened in VS Code and it had the original coloring. So I thought, “that’s a good thing.” But when I then clicked on “Terminal>Run Build Task…” I go that same error message. Shown in the third screen grab.

For the last one, it seems to be telling you that you need to do Terminal | Configure Default Build Task …

I don’t understand what changed between the first two and this one, because you were getting compiles.

I see the problem. Don’ t copy the vscode-template folder into there. Copy the .vscode from inside vscode-template to the same folder as the hello.cpp. If that vscode-template is a copy, nuke it after you’ve extracted its .vscode folder.

Hi there!

Based on the images you’ve shown, there are two different problems with two different solutions.

In the first photo, your .cpp file is actually named as a .cpp txt file. Just need to remove the “txt” bit and the file should be recognized as a C++ file.

For photos 2 and 3, this is happening because the .dll files from the template project are not present in the folder you’ve setup. While one potential solution is to copy the .dll files over, I have a more permanent solution.

If you setup RayLib as part of your Path variable in Windows, VS Code will know where to find the compiler. Here is a short guide on how to add the appropriate path in Windows

Use C:\raylib\mingw\bin as your path, or wherever you installed Raylib. Once you’re done, you will need to restart your computer for the change to take effect.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms