using notepad++ to compile?

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2007
Posts: 77
Reputation: revenge2 is an unknown quantity at this point 
Solved Threads: 2
revenge2's Avatar
revenge2 revenge2 is offline Offline
Junior Poster in Training

using notepad++ to compile?

 
0
  #1
Jun 20th, 2009
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.
|--- A Thank you to all the Forum members ---|
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1,968
Reputation: tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute 
Solved Threads: 214
tux4life's Avatar
tux4life tux4life is offline Offline
Posting Virtuoso

Re: using notepad++ to compile?

 
0
  #2
Jun 20th, 2009
Originally Posted by revenge2 View Post
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.
I assume that the g++ command is in your PATH and that your environment variables are set correctly.

Then follow these steps:
  • Create a simple batch file called compile.bat which contains the following:
    1. g++ -o %1 %2
    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."
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1,968
Reputation: tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute 
Solved Threads: 214
tux4life's Avatar
tux4life tux4life is offline Offline
Posting Virtuoso

Re: using notepad++ to compile?

 
1
  #3
Jun 20th, 2009
Please don't mind reading my previous post, just read this article:
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."
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,588
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1487
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: using notepad++ to compile?

 
0
  #4
Jun 20th, 2009
Why would you want to do that? Just use Code::Blocks and you have it done, and probably much better too. And Code::Blocks contains a debugger, which Notepad++ does not.
Last edited by Ancient Dragon; Jun 20th, 2009 at 9:15 am.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 77
Reputation: revenge2 is an unknown quantity at this point 
Solved Threads: 2
revenge2's Avatar
revenge2 revenge2 is offline Offline
Junior Poster in Training

Re: using notepad++ to compile?

 
0
  #5
Jun 22nd, 2009
hmm...i was hoping to just edit text files without getting into major IDE's.
|--- A Thank you to all the Forum members ---|
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 360
Reputation: jencas is just really nice jencas is just really nice jencas is just really nice jencas is just really nice jencas is just really nice 
Solved Threads: 69
jencas jencas is offline Offline
Posting Whiz

Re: using notepad++ to compile?

 
1
  #6
Jun 22nd, 2009
Some people use to eat their soup with a fork.......
If you are forced to reinvent the wheel at least try to invent a better one!

Please use code tags - Please mark solved threads as solved
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC