<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Trouble Setting Up NppExec to Learn C++]]></title><description><![CDATA[<p dir="auto">I use Notepad++ for all my text editing needs, I thought it would be nice to use it as I try to learn C++ with my son who is interested in learning to program for robotics. I have installed MinGW on Win10 and the C:MinGW\bin folder has been added to the system path. I searched the forum and got the following code to put into NppExec to run the c++ compiler and then run the compiled file.<br />
<code>npp_save</code><br />
<code>cd "$(CURRENT_DIRECTORY)"</code><br />
<code>g++ "$(FILE_NAME)" -o "$(NAME_PART)"</code><br />
<code>cmd /c "$(NAME_PART)"</code></p>
<p dir="auto">Unfortunately, I get the following when I run the script in NppExec:<br />
<code>NPP_SAVE: C:\Users\CorrectPathtoCurrentDirectory\CPP-Projects\hello.cpp</code><br />
<code>CD: C:\Users\CorrectPathtoCurrentDirectory\CPP-Projects</code><br />
<code>Current directory: C:\Users\CorrectPathtoCurrentDirectory\CPP-Projects</code><br />
<code>g++ "hello.cpp" -o "hello"</code><br />
<code>CreateProcess() failed with error code 2:</code><br />
<code>The system cannot find the file specified.</code><br />
<code> </code><br />
<code>cmd /c "hello"</code><br />
<code>Process started &gt;&gt;&gt;</code><br />
<code>'hello' is not recognized as an internal or external command,</code><br />
<code>operable program or batch file.</code><br />
<code>&lt;&lt;&lt; Process finished. (Exit code 1)</code><br />
<code>================ READY ================</code></p>
<p dir="auto">I have tested that g++.exe works by opening a powershell in that directory, and running the following command:<br />
<code>g++.exe .\hello.cpp -o hello.exe</code><br />
This compiled the text file into an  executable that also worked in powershell. I would appreciate any help in being able to call g++ from within Notepad++ and see the output in the Console of NppExec. Thanks.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/14050/trouble-setting-up-nppexec-to-learn-c</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 05:56:37 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/14050.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Jun 2017 18:31:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Trouble Setting Up NppExec to Learn C++ on Wed, 28 Jun 2017 21:08:26 GMT]]></title><description><![CDATA[<p dir="auto">Thank you, Jim Dailey, that did the trick. I see why that worked now that I look at it. I should have considered that. The forum post that I saw seemed to indicate that the original code that I had without the extra cmd /c should have worked. Now I’m off to learn C++ which looks to be a challenge for an old dog.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/25235</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/25235</guid><dc:creator><![CDATA[Steve Daley175]]></dc:creator><pubDate>Wed, 28 Jun 2017 21:08:26 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble Setting Up NppExec to Learn C++ on Wed, 28 Jun 2017 19:58:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/steve-daley175" aria-label="Profile: Steve-Daley175">@<bdi>Steve-Daley175</bdi></a></p>
<p dir="auto">Try this:<br />
<em><strong>cmd /c</strong> g++ “$(FILE_NAME)” -o “$(NAME_PART)”</em></p>
]]></description><link>https://community.notepad-plus-plus.org/post/25231</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/25231</guid><dc:creator><![CDATA[Jim Dailey]]></dc:creator><pubDate>Wed, 28 Jun 2017 19:58:07 GMT</pubDate></item></channel></rss>