• Register
0 votes

Problem :

I am completely new to the Notepad++ and C++ programming language. I am unable to figure out that what has gone wrong in my coding, may be it might look simple to resolved to many. I tried a lot to search for the solution, but without any success. While I was trying to config my application for C++ compiler on the Windows 8.1, I encountered the following message:

NPP_SAVE: C:\Users\alecxe\Desktop\MyHelloWorld.cpp
CD: C:\Users\alecxe\Desktop
Current directory: C:\Users\alecxe\Desktop
Compiled.exe -c -w "MyHelloWorld.cpp"
CreateProcess() failed with error code 2:
The system cannot find the file specified.
================ READY ================

My C++ basic code very simple to testing only as below :

// My first hello world program in C++
using namespace std;
int main()
    cout << "My Hello World!";
    return 0;

The NppExec script taken as below :

Compiled.exe -c -w "$(FILE_NAME)"

Please guide me in resolving this issue.

6 5 3
7,540 points

1 Answer

0 votes

Solution :

All will boils down to the compiler which you want to use... which one are you going to use? The MSVC (Microsoft Visual Studio) ?

Example: if you already have MSVC2010 installed you might use it as below :

1.    Please execute the Start->All Programs->Microsoft Visual Studio 2010->Visual Studio Tools->Visual Studio Command Prompt (2010)

2.    After that  do Digit cl (yourFileName).cpp

3.    And you are done, yourFileName.exe should now exist

So the above can be rewritten as below :

cl.exe "$(FILE_NAME)"

after making sure that the path to cl.exe is correctly available.

This will resolve your issue.

9 7 4
38,600 points

Related questions

0 votes
1 answer 159 views
Problem : I am learning Android Programming. Recently I upgraded the Windows OS and after that I reinstalled my Android studio 0.3.2. Currently I am using windows8.1 Pro. If I try to run the android project I often face below error: Cannot run program "C:\Program Files ... 2, The system cannot find the file specified I am struggling with this error from past 4 days but still I am unable to fix it.
asked Feb 27 mphil 2.3k points
0 votes
1 answer 195 views
Problem : Facing following git error cannot run program "git.exe": createprocess error=2, the system cannot find the file specified
asked Nov 13, 2019 peterlaw 6.9k points
1 vote
1 answer 136 views
Problem: I have recently started learning file handling with Python. I am currently having the folder which is full of pdf files. My task is to remove all the spaces from all the file names and then try to replace them with the underscores. Please find below the code ... my issue, but I have tried to look all over and still unable to find the solution for my above error related to file handling.
asked Jun 2 Martin K 6.6k points
0 votes
1 answer 18 views
Please I would like to know how I can solve this error during programming : filenotfounderror: [winerror 2] the system cannot find the specified file
asked Oct 23 psandprop 2.4k points
0 votes
1 answer 48 views
Problem : I want to compile my code to test my function to read and print the data file, but I get the compiling error that I don't understand as follows "Error: expected constructor, destructor, or type conversion before ';' token".
asked Jan 24 jwilliam 3.9k points