Why is C++ compiler displaying “source file not found”

Asked By 30 points N/A Posted on -

I recently started writing in C++ but I have some Challenges, anytime I type in a code, about 2 runs and Compile, It pops up an error: “source file not found “. I’ve tried to search Google, but the information I got is somehow confusing. I even send the code to my friend that taught me the programming language, but he said there is no error in the syntax.
NB•i use Dev C++ as my compiler. I have also tried Using Codeblocks but the error Still persists
What is “Mingw32” I came Across why troubleshooting?

Answered By 0 points N/A #189979

Why is C++ compiler displaying “source file not found”


It might not be issue with your compiler. For compiling any program, there are some prerequisite needs to be done. Before compiling program, a variable “PATH” needs to be set. Make sure that the compiler is working perfectly fine. Run a command for compiler to check the working of compiler. Check the version compatibility also.
Dev C++ is compatible with windows 8. For setting “PATH” variable follow the below steps:
1. Right click on My Computer
2. Click on Properties
3. On the left side, there is option “Advanced System Settings”. Click on Advanced system settings.
4. At the bottom of the page, click on “Environment variable”
5. In system variables panel, Click “New”
6. Set Variable name as: PATH
7. Set Variable Value as for ex. C:Program Files (x86)Dev-CppMinGW64bin.
8. Click OK.

Once you set the PATH variable, still the program gives you an error then try out another solution.
Create new project and create new file in that project. Save that file with required code and try to run that file.

Hope it helps!

Login/Register to Answer

Related Questions