• 0

Linking Notepad++ to run a compiler on F5?


Question

For college purposes, I need a quick, and light C IDE. Been using DevC++, since it's easy enough to create a new source file, enter code, and compile, without the need for creating projects, dependencies etc.

Problem with DevC++ is that the editor has some pretty bad highlighting and options. Notepad++ is miles ahead.

Now, I found that Notepad++ has options to run an external program, with arguments, when pressing F5, explained on the following link: http://notepad-plus.sourceforge.net/uk/run-HOWTO.php

Could anyone tell me how exactly to do that, and to which file? DevC++ is based on GCC, so it has gcc.exe in its root folder.

In lixux, the gcc syntax is, if I remember correctly:

gcc inputname.c -o outputname

Anyway, to sum it up, I would need the following: When you press F5, n++ calls GCC, and compiles and runs a new file, with its filename the same as the source code filename.

Thanx in advance :)

8 answers to this question

Recommended Posts

  • 0

yes it possible, but with plug-ins and mini plug-in script

see:

// The script code, C source code compiling with GNU CC (GCC) in notepad++ (by "NppExec" plug-in) and compressing with UPX...
//
// Enable? "//" signs remove in code line. 
// Sample: C:\Program Files\CodeBlocks\MinGW\bin\gcc.exe "$(FULL_CURRENT_PATH)" -o $(NAME_PART)

YOUR_GCC\BIN\_PATH_HERE\gcc.exe "$(FULL_CURRENT_PATH)" -o $(NAME_PART)

// UPX Compress (with "--best, --ultra-brute" options)
// Enable? "//" signs remove in code line. 
// Sample: C:\WINDOWS\system32\upx.exe --best --ultra-brute $(NAME_PART).exe

YOUR_UPX_PATH_HERE\upx.exe --best --ultra-brute $(NAME_PART).exe

  • 0

I tried doing the post above to see if it worked and it seemed to compile fine, but it doesn't generate the .exe file within the folder with my sourcecode. I'm guessing the script needs some addition to copy it there.

Problem with DevC++ is that the editor has some pretty bad highlighting and options. Notepad++ is miles ahead.

Now, I found that Notepad++ has options to run an external program, with arguments, when pressing F5, explained on the following link: http://notepad-plus.sourceforge.net/uk/run-HOWTO.php

Could anyone tell me how exactly to do that, and to which file? DevC++ is based on GCC, so it has gcc.exe in its root folder.

In lixux, the gcc syntax is, if I remember correctly:

gcc inputname.c -o outputname

Anyway, to sum it up, I would need the following: When you press F5, n++ calls GCC, and compiles and runs a new file, with its filename the same as the source code filename.

Thanx in advance :)

You can edit the highlighting of DevC++ although I do like Notepad++. You might want to give Code::Blocks a go. It's also a pretty lightweight IDE, and it has some customisation options for syntax highlighting also.

  • 0
On my system, Visual Studio's cold start is about 3 seconds, while Code::Blocks takes above 5 seconds. Eclipse takes 15 :p . I wouldn't rule out VS on the sole basis that it's a large and powerful IDE. It's also very efficient.

Yeah I'll give you that, VS starts pretty quick on mine, although saying that Code::Blocks is around the same time. Feature-wise VS wins but I still like using CB / Dev C++ :p I think when I first started out and tried to do a few things in VS and it threw all this code at me before I could any of my own threw me a bit. Maybe I just tend to avoid it subconsciously now :laugh:

  • 0
Yeah I'll give you that, VS starts pretty quick on mine, although saying that Code::Blocks is around the same time. Feature-wise VS wins but I still like using CB / Dev C++ :p I think when I first started out and tried to do a few things in VS and it threw all this code at me before I could any of my own threw me a bit. Maybe I just tend to avoid it subconsciously now :laugh:
I just redid my very informal test in which I count seconds out loud, watching the clock gadget, after lauching the program :

Visual Studio : 2.5 seconds

Code::Blocks : 3 seconds

Eclipse : 14 seconds

It's not very scientific :p but the results seem consistent. I wonder if there's an easy way to write a program that can reliably benchmark this? Anyway, my point was just to dispel the popular myth that open-source = much more efficient, because I've seen fully-fledged IDEs like DevC++ and Code::Blocks mentionned as "lightweight" alternatives, and I supposed VS was automatically cast aside based on that myth.

Of course I'm personally a big VS fan, the only reason I ever use anything else is if I'm working in Java or Python, or if I'm stuck on Linux for some homework. Oh and if you want your project to be empty : File -> New -> Project -> Visual C++ -> Empty Project. No code, not even a main.cpp. :)

  • 0
On my system, Visual Studio's cold start is about 3 seconds, while Code::Blocks takes above 5 seconds. Eclipse takes 15 :p. I wouldn't rule out VS on the sole basis that it's a large and powerful IDE. It's also very efficient.

i agree. even though it's bloated, it's the best compiler out there and it's free (express edition)

  • 0
Oh and if you want your project to be empty : File -> New -> Project -> Visual C++ -> Empty Project. No code, not even a main.cpp. :)

Yeah I think this was something I missed when I first started using VS :laugh: I'll give it another shot some time soon!

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Microsoft explains how it made Teams so much faster in 2026 by Usama Jawad Microsoft Teams is Redmond's flagship online communication and collaboration tool, primarily used in enterprise, government, and school environments. It regularly receives updates, with Microsoft frequently revealing features currently in development as well, such as Efficiency Mode and a dedicated app for meeting recaps. Now, the company has shed some light on the backend enhancements it has made to its popular software in 2026. During the first half of 2026, switching between chats has become 20% faster on desktop and web, which is especially great for less powerful devices or hardware on weak networks. Microsoft explains that it tracks two types of chat switches. The first is a warm switch, which relates to returning to a recent chat, in which case it is most likely already present in memory and should load extremely fast. The other is a cold switch where a chat that hasn't been opened recently is now opened. Naturally, the second type of chat switch was causing the most notable latency spikes. Microsoft realized that this was happening because of three reasons. First, the query to fetch conversation data was being fired too late. Next, queries were being sent sequentially, increasing the overall round-trip time. Finally, there was no handling of response priority, which meant that non-critical responses would sometimes block the main thread. Microsoft solved all of these problems by firing the data query immediately, bundling queries to be sent together so that they wouldn't create a "waterfall" effect, and enabling faster painting of the frame. As a result, warm and cold switches now have almost the same latency, and the only distinguishable difference between them is due to the data layer response time. Next, Microsoft focused on reducing app hangs and freezes on macOS and iOS by 35%. On macOS, the company has a health monitor thread running in the background that does exactly what it says on the tin. The tech firm built a dedicated StackDecoder tool to analyze health monitor's output at scale. Through this combination, it decided to move several error reporting and monitoring threads either to the background or treated them as an asynchronous call so that they wouldn't block the main thread, causing Teams to freeze. On iOS, the same result was accomplished through optimization of computations, caching, offloading operations from the main thread, refactoring database access behaviors, deferring non-critical tasks, and more. On a related note, it also made people search 25% on iOS by optimizing the query pipeline, and efficient database task queuing and scheduling. However, Microsoft has emphasized that improving Teams' performance is an ongoing endeavor, and that it hopes that these efforts will continue to make the software a reliable partner in online communication scenarios. On a related note, Microsoft recently unveiled some upcoming performance upgrades for OneDrive on macOS too, and you can check those out here.
    • Let Apple have its way, as customers will eschew Apple in favor of more open solutions--which is what they should be doing anyway!... I'm not a fan of Apple at all, but when the lawyers in the EUC start dictating to companies how their software should be made, I think the companies should just drop the EU altogether as a market. EUC lawyers make a mint every time they levy a fine on a successful American software company. What a racket. The EU consumer should be the final word on what products he buys and which ones he doesn't, but the EUC seeks to put itself into the position of the EU customer, and make those decisions for him, under the guise of "helping him." Q. What do you do when the person at your door says, "Hi! I'm from the government, and I'm here to help you make intelligent buying decisions!" A. Grab your possessions and run for the hills...
    • Just another show from my childhood ruined by wokeness 'politically correct' BS. They should let some things just die out gracefully.
  • Recent Achievements

    • First Post
      StaticMatrix earned a badge
      First Post
    • Week One Done
      StaticMatrix earned a badge
      Week One Done
    • Rookie
      lamborghiniv10 went up a rank
      Rookie
    • One Month Later
      pinnclepd earned a badge
      One Month Later
    • First Post
      X-No-file earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      518
    2. 2
      PsYcHoKiLLa
      210
    3. 3
      +Edouard
      147
    4. 4
      Steven P.
      94
    5. 5
      ATLien_0
      81
  • Tell a friend

    Love Neowin? Tell a friend!