Menu

May I compile C in notepad++?

le dung
2008-08-17
2012-11-14
  • le dung

    le dung - 2008-08-17

    I have notepad++ version 5.0.3 . Please, may I compile C in notepad++? And if have, can you show me the way to compile??

     
    • le dung

      le dung - 2008-08-19

      oh yeah, now I understand. Thank you very much ^^!!
      Why does NPPexec say: "undefined symbol 'clrscr' "???? And I don't know why I can't use "clrscr();"

       
      • DV

        DV - 2008-08-20

        tcc says it.
        As I understand, it's because of 'clrscr' is not exported by "msvcrt.dll". Ask Microsoft why they did not implement this function in "msvcrt.dll". Good luck :-)

         
    • le dung

      le dung - 2008-08-20

      Hi DV,
      Thank you for greating help! Perhap, I use Borland C because I can use command "clrscr" and "gotoxy" >"<

       
    • DV

      DV - 2008-08-17

      A trick - running simple C-programs from N++
      https://sourceforge.net/forum/forum.php?thread_id=1707502&forum_id=672146

      (How to) Apply external tool to selected text [requires NppExec 0.2.4 or higher]
      https://sourceforge.net/forum/forum.php?thread_id=2109641&forum_id=672146
      ! please pay attention to the problem in NppExec 0.2.4:
      https://sourceforge.net/forum/message.php?msg_id=5081090

       
      • DV

        DV - 2008-08-17

        Regarding the tcc command line:
        if you want to compile several .c files, you must use '-run' after the file names e.g.

        tcc file1.c file2.c -run

         
    • le dung

      le dung - 2008-08-18

      Dear DV, thank you very much ^_^.Notepad++ help me compose simple and effective. Thank you again !!

       
    • le dung

      le dung - 2008-08-18

      Hey,can you help me please? I do something what you say, but when I run code "C:\tcc\tcc.exe -run "$(FULL_CURRENT_PATH)" ,in the console dialog only have a messeage:"process started.."???

       
    • DV

      DV - 2008-08-18

      Well, what did you expect?

       
    • DV

      DV - 2008-08-18

      If you want to compile a program and start it in its own window, execute the following in NppExec:

      // compiling current file 
      "C:\tcc\tcc.exe" "$(FULL_CURRENT_PATH)" -o "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"
      // running the output .exe file 
      NPP_RUN "$(CURRENT_DIRECTORY)\$(NAME_PART).exe"

      The previous example with the option '-run' runs compiled source immediatly - i.e. it starts (executes) your program.
      For more details about tcc's available options run tcc.exe without parameters:

      C:\tcc\tcc.exe