DEV Community

0 seconds of 0 secondsVolume 90%
Press shift question mark to access a list of keyboard shortcuts
00:00
00:00
00:00
 
Sergiu Mureşan
Sergiu Mureşan

Posted on

9 4

Compile and run C/C++ code using Notepad++

For compiling and running using MinGW:

npp_save
cd "$(CURRENT_DIRECTORY)"
gcc -o "$(NAME_PART).exe" "$(FULL_CURRENT_PATH)"
"$(NAME_PART).exe"

For compiling and running using Visual C:

npp_save
cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build"
vcvarsall.bat x64 && cl "$(FULL_CURRENT_PATH)" /Fo$(CURRENT_DIRECTORY)\ /link /out:"$(CURRENT_DIRECTORY)\$(NAME_PART).exe"
cd $(CURRENT_DIRECTORY)
"$(NAME_PART).exe"

More info on Visual C vcvars scripts:
https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019

Top comments (0)

AWS Industries LIVE! Stream

Watch AWS Industries LIVE!

Discover how cloud technology is solving real-world problems on Industries LIVE!

Learn More

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay