| | |
using notepad++ to compile?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
•
•
hello there. i've installed mingw compiler and im wondering how i would go about setting up notepad++ to compile my c/c++ code?. How do i do this?
-regards.
Then follow these steps:
- Create a simple batch file called compile.bat which contains the following:
C++ Syntax (Toggle Plain Text)- g++ -o %1 %2
- PAUSE
- Save it in the same directory as your C++ source file.
- In Notepad++, you open the Plugins menu > NppExec > Follow $(CURRENT_DIRECTORY)
(or you just press F5), a little dialog pops up, click the ... button and browse to the directory where your source file (and thus your batchfile) is in, select the batchfile (compile.bat) and click on Open, the path to your batchfile is now added to that textbox, now you have to put quotes (") around it, a little example:
Let's say that the path to your batch file is:C:\compile.bat, then after putting quotes around it it becomes"C:\compile.bat", after that you type the name you want to give to your executable file, for instance myprogram.exe, and thereafter (seperate those two with a space) you type the name of your C++ source file, for example: mysrc.cpp, the whole line would then be: -
"C:\compile.bat" myprogram.exe mysrc.cpp
Hope this helps
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
Please don't mind reading my previous post, just read this article:
http://notepad-plus.wiki.sourceforge...Compiler+Guide
http://notepad-plus.wiki.sourceforge...Compiler+Guide
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
![]() |
Similar Threads
- C Queries (C)
- J2ME List (Java)
- Can i run a C++ program on notepad? (C++)
- How will i start (C++)
- java compiler (Java)
- Favorite Java textbook (Java)
- The Move.....Visual Basic 6, Visual Basic .NET ? (VB.NET)
- Notepad VS. Something Else (Java)
- static compile (Visual Basic 4 / 5 / 6)
Other Threads in the C++ Forum
- Previous Thread: Read and write at same time?
- Next Thread: sum advice using SWITCHING
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator getline givemetehcodez graph iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






