How do I compile C++

2006-07-27
2012-11-13
  • Nobody/Anonymous

    I just can't find it on notepad++

     
    • !NeGaTiVe!

      !NeGaTiVe! - 2006-07-28

      It is a notepad, not a compiler. However you can create shortcut to run the compiler from n++.
      http://notepad-plus.sourceforge.net/uk/run-HOWTO.php it should help.

       
      • Edwin C Holley

        Edwin C Holley - 2006-08-26

        This is an interesting argument.  What then is an IDE?  This is not a "simple" editor, it passed that a long time ago.  Things like syntax highlighting, folds, bracket checking, these things make an IDE.  To not include a compile/run windows because "this is a simple text editor", is absurd.  If you don't want to include it say "we have chosen not to".  Also, if someone could code a "simple" command line wrapper, a link would be nice.  I am not anywhere near strong enough in VB.NET to code one.  I am working with perl, and it is enough of a headache.  Why did I uninstall Crimson Editor.  I have been up  trying to learn Perl for the last 14 hours, because my project has a script that I need to use.  Sorry if I seem angry, but I AM.  Not at the program which is great, but at the general difficulty with not being able to use/support open source software.  How can I get my friends/company to use/invest in it, when seemingly simple things like this pop up.  Open Source is somthing that I love, I love donating to projects, I love getting companys to donate to projects.  Gotta go.

         
        • Paulius

          Paulius - 2006-08-26

          Well, in Notepad++ there is Run menu. You can add your own commands to it. However, the best you can do is compile the currently active file. That's it. You see, IDE is an Integrated Developement Environment - IDE has integrated compiler, debuger, and most important - multi-source file project support. Now, this is the most important feature that makes Notepad++ a simple code editor - without project support it's hard to build (compile and link) projects.

           
    • Nobody/Anonymous

      Hello

      Yes it is an editor - but a nice one!

      I figured out how to call bcc32.exe as a shortcut but still have the problem that the "Dos-box" is closed too fast if I have an error in my source code.

      Is there a way to leave the Dos box open until I hit a key or quit it?

      The other way would be to type something like this at the dos prompt:

      c:>bcc32.exe myprog.c >error.log

      buthow do I pass a "> error.log" text after I have inserted the "$(FULL_CURRENT_PATH)"? I would need something like:

      C:\borland\bcc55\bin bcc32.exe "$(FULL_CURRENT_PATH)" + "> error.log".

      I hope I could make myself clear!

      Bye
      Ingo

       
      • Paulius

        Paulius - 2006-07-29

        You can always make the BATCH script (bat or cmd file), that runs your compiler. Your script could look like this:
        [code]
        @echo off
        C:\borland\bcc55\bin\bcc32.exe %1
        pause
        [/code]
        If you put this script into the same directory as your bcc32.exe file and name it bcc32-script.cmd, then you would put this line into notepad++ run dialog:
        C:\borland\bcc55\bin\bcc32-script.cmd "$(FULL_CURRENT_PATH)"

        That is all you need.

         
        • Nobody/Anonymous

          I use borland's c/c++ compiler.  Here is the batch file I use to compile from NP++:

          echo Compiling!!
          cd "%1"
          bcc32 "%2"
          @echo off
          cmd

          It takes two command line arguments, first the path of the file you want to compile, and then the name of that file.  It then changes to the directory, and compiles with the command <bcc32 "the_file_name">.  Then it keeps the command box open, so that you can run the compiled program, or look at any error reports you have.

          Here is my new entry in shortcuts.xml:

          <Command name="Borland C compiler" Ctrl="no" Alt="yes" Shift="no" key="118">C:\path_to_compile.bat\compile.bat "$(CURRENT_DIRECTORY)" "$(FILE_NAME)"</Command>

          Note that this assumes that the path to the compiler (bcc32.exe) is in the Windows PATH environment variable.

           
    • Nobody/Anonymous

      Thx Paulius

      "%1" was the thing that sliped out of my mind!

      It works like a charm now.

      Bye and thx again

       
    • Nobody/Anonymous

      Hello,

      well, if you know how to do that, you may create just a short C programme, wich would work like a wrapper, and will wait for a key press before exiting, or wich would redirect standard error stream to a dedicated file.

      That's just a little work to do for a programmer like you :)

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks