Sublime Text, Notepad++, Compile and Run C Program

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024

Комментарии • 91

  • @saitaro
    @saitaro 7 лет назад +1

    Can't express how useful this video is. Thanks man, you're the boss.

  • @violinsheetmusicblog
    @violinsheetmusicblog 8 лет назад +1

    Seriously dude, thanks so much. I was literally using ssh to remotely access a linux computer to compile all my scripts. It was extremely slow and a terrible method. This is so much better!

  • @ngocnguyenduyminh2117
    @ngocnguyenduyminh2117 6 лет назад +1

    I've tried so hard and luckily I found your video. And it's work :D Thanks you so much!

  • @jvcho
    @jvcho 3 года назад +1

    Thanks friend it works perfectly. You are a genius.

  • @cesarnontol
    @cesarnontol  9 лет назад +3

    Just to remember that the commands which I use is for ANSI C. You can to compile C without this standard just by deleting these commands from the compilation code:
    "-Wall", "-ansi", "-pedantic-errors"

    • @elcarrapa
      @elcarrapa 9 лет назад +1

      +César Yapunari Nontol Rodríguez
      thanks.
      I've had a error compiling a for, something to do with the string lenght, I had to add
      "-std=c99"
      and then it worked.

    • @cesarnontol
      @cesarnontol  9 лет назад

      +Miguel Soares Thanks man!

    • @elcarrapa
      @elcarrapa 9 лет назад

      I still have errors with diferent programs :(
      I started using the geany app. it's not sublime, but it has the same themes :P

    • @chred887
      @chred887 8 лет назад

      bROTHER es mas simple invocando al compilador de C desde el CMD por que te complicas la vida ?

  • @pratikthorat3480
    @pratikthorat3480 5 лет назад +1

    printf("Nice work my man thanks for the help. You saved my neck");

  • @vedantkashyap2706
    @vedantkashyap2706 8 лет назад +2

    if you want to run you r code in C99 instead of C90 then replace -ansi entry with '-std=c99' C99 in my opinion is much better since there is no problem in mixing declarations and code...

    • @dsniloy9289
      @dsniloy9289 Год назад

      It is 2023 and thanks a lot.

  • @kanhuhembram3565
    @kanhuhembram3565 4 года назад +1

    Thanks man!!..Very much appreciated.

  • @louis8143
    @louis8143 4 года назад +1

    Thanks Bud saved me a lot of time; ;)

  • @cavanon
    @cavanon 9 лет назад +2

    Thanks. Great work!

  • @roberth_pereira
    @roberth_pereira 8 лет назад

    thanks XD
    notes:
    remove this for compiling
    "-Wall", "-ansi", "-pedantic-errors"

  • @8trupdate797
    @8trupdate797 5 лет назад

    Thank you........... you have saved me

    • @rouaneabdelkrim
      @rouaneabdelkrim 4 года назад

      hi hope u doing good
      in this video when i went searching gcc.exe i didnt find it in my machine
      can u help plz

  • @galenuxs
    @galenuxs 8 лет назад

    Thank you very much for the video you've made,has been of great help.
    A greeting.

  • @salvadorguidojuarez7845
    @salvadorguidojuarez7845 8 лет назад

    You are the real MVP

  • @Tondz1
    @Tondz1 8 лет назад +2

    This is pretty much what I need but there seem to be a problem when it come to putting comments. I can't seem to find a valid a way on putting comments in my code using this build compared to other builds.
    This is the error:
    1_10_16.c:27:1: error: expected identifier or '(' before '/' token
    //comment
    ^
    Edit: After deleting the commands "-Wall", "-ansi", "-pedantic-errors" I can now put comments on my code. Thanks alot!

  • @AbhishekSingh-sp6dc
    @AbhishekSingh-sp6dc 5 лет назад +1

    Thanks a lot yaar!!!!!!!
    Please post for cpp too

  • @rohanramani6243
    @rohanramani6243 6 лет назад

    Thank You SIr. Works perfectly.

  • @ahmetertugrulkaya7134
    @ahmetertugrulkaya7134 3 года назад

    Thanks man! btw works with sublime text 3.2.2

  • @anothertechguy-q9g
    @anothertechguy-q9g 9 лет назад

    Nice work, runnig perfect in my machine, thank you!

  • @hpchiquistriquis
    @hpchiquistriquis 9 лет назад +9

    I'm having this error while trying to build
    'gcc' is not recognized as an internal or external command,
    operable program or batch file.
    [Finished in 0.1s with exit code 1]

    • @I_Am_Veks
      @I_Am_Veks 8 лет назад

      +Raven Oxford Have you fixed it? I've been looking for a while with no luck

    • @hpchiquistriquis
      @hpchiquistriquis 8 лет назад

      ahahaha no, well not in my linux partion, in windows I think I did, I really don't remember :v since I've been using linux for a while now.

    • @mitkatwala1302
      @mitkatwala1302 7 лет назад

      hey have anyone of you figured out how to solve this problem? please let me know!

  • @dharmang
    @dharmang 6 лет назад

    thnx finally this worked i tried many codes :

  • @carlospecam
    @carlospecam 8 лет назад

    Yeah baby

  • @MatoZ96
    @MatoZ96 8 лет назад

    Hello, nice video, can you please explain why we should edit variabiles of the system?
    I talking about that part when you added into path variabile, path to the C:\MinGW\bin.
    Because when I dont do this step, gcc compile it with no problem too. (I can call gcc command from anywhere).
    I know PATH is to run programs from any dir, f.e. you can type calc in CMD from any dir and program will start. But I am asking if is there some other meaning.

  • @guilhermepenacespedes1865
    @guilhermepenacespedes1865 9 лет назад +1

    Thanks

  • @dineshkoravi
    @dineshkoravi 8 лет назад

    Thanks. worked for me !

  • @prezlamen
    @prezlamen 5 лет назад +1

    Is it possible to use powershell insted of cmd? I was tried to put wpsh but not working.

  • @wayarjoel
    @wayarjoel 8 лет назад

    Buena!

  • @bevakis100
    @bevakis100 6 лет назад +1

    I have an error when I run it:
    gcc: fatal error: input file 'Testc.exe' is the same as output file
    compilation terminated.
    [Finished in 0.1s]
    Any help?

  • @mentanagavenkatasrinivas9245
    @mentanagavenkatasrinivas9245 3 года назад

    Thanks bro

  • @sebdrw9504
    @sebdrw9504 6 лет назад +1

    There's no folder user in SublimeText package, when i create one and add MyC_sublime-build , i cannot find it in the build list in tools ... -.-' what the hell

  • @veerawatd.3909
    @veerawatd.3909 8 лет назад

    Thank Bro, It's working :)

  • @rahulsriram6295
    @rahulsriram6295 5 лет назад

    Please make a video for python too, like taking user input and running it on CMD

  • @Tae_Grixis
    @Tae_Grixis 9 лет назад +1

    This is the third video about this topic that has had no audio. Is anyone else having this problem or is it just the people that make these videos?

    • @cesarnontol
      @cesarnontol  9 лет назад

      Matthew Hancock Hi. Yes, I'm sorry, the video don't have audio with the instructions. It's because I just speak little English.

  • @meemow18
    @meemow18 9 лет назад

    english would be nice and a worded instruction would be also fantastic

  • @EduardoHashimoto13
    @EduardoHashimoto13 8 лет назад

    Hi, thanks for the video.
    But what about the math.h library? Should I change anything in the commands?
    Thank you

    • @EduardoHashimoto13
      @EduardoHashimoto13 8 лет назад

      Estou tentando usar o math.h, mas apesar de compilar ele não retorna o valor correto.

    • @cesarnontol
      @cesarnontol  8 лет назад

      Hi. Yes, just add "-lm" to the command and it should work.

  • @alainerosprestige2118
    @alainerosprestige2118 7 лет назад

    thanks

  • @nitro9637
    @nitro9637 5 лет назад

    yes

  • @welliton7924
    @welliton7924 8 лет назад

    when i try the notepad++ method, it says "CreateProcess() with error code 2: system coudn't find the specified file", and it doesn't work at all.

  • @ptru
    @ptru 8 лет назад +1

    Hi, thank You for the video. I have just one question. I saw that You have similar Build System for C++ called "myC++". Could You please post Sublime Build Code for that as well? Thank You.

    • @cesarnontol
      @cesarnontol  8 лет назад

      Hi. I'm sorry, I don't know for c++.

    • @ptru
      @ptru 8 лет назад

      +César Yapunari Nontol Rodríguez Nevermind. Thank You anyway. :)

  • @mquanit
    @mquanit 7 лет назад

    'C:\Users\Mohammad\Documents\C' is not recognized as an internal or external command,
    operable program or batch file.
    [Finished in 0.6s].
    please help me i m getting this error.

  • @elieceraguilar2340
    @elieceraguilar2340 8 лет назад

    me aparece este error al compilar un programa que hize
    fatal error: conio.h: No such file or directory
    #include

  • @jano.6390
    @jano.6390 8 лет назад

    i dont know what that mean you pasted at text on 1:01
    could i use it despite the address of gcc is not same as you?

    • @cesarnontol
      @cesarnontol  8 лет назад

      +jan O. Yeah, the code is in the video description. It was just copy and paste! "gcc" is required for C. "-Wall", "-ansi", "-pedantic-errors" are optional.

  • @praveengajulapalli6989
    @praveengajulapalli6989 9 лет назад

    On my system sublime is working when cpp source file is in "C:\MinGW\bin". but it isn't working when source file is in some other location. How to fix it? Thanks in Advance

  • @danielherreragonzalez4311
    @danielherreragonzalez4311 9 лет назад

    okay, and how about for ubuntu? would it work too?

  • @OfficialYuzzi
    @OfficialYuzzi 7 лет назад

    Sublime Texte do the build correctly but the cmd do not start and i can't find the ".exe" ^^'

  • @RahulGupta-ju1tm
    @RahulGupta-ju1tm 9 лет назад +2

    It's not working!
    It says "gcc" is not recognized as internal or external command :(

    • @cesarnontol
      @cesarnontol  9 лет назад

      Rahul Gupta Hi! That happened because first you need to install GCC in your PC!
      See this video to install GCC:
      ruclips.net/video/DHekr3EtDOA/видео.html

    • @RahulGupta-ju1tm
      @RahulGupta-ju1tm 9 лет назад

      i installed minGW
      how to install gcc?

    • @cesarnontol
      @cesarnontol  9 лет назад

      Rahul Gupta In the MinGW Installation Manager (Basic Setup) you at least need to mark for installation "mingw32-base" and apply changes. By doing this GCC will be installed.

    • @RahulGupta-ju1tm
      @RahulGupta-ju1tm 9 лет назад

      César Yapunari Nontol Rodríguez did that already!! No result

    • @I_Am_Veks
      @I_Am_Veks 8 лет назад

      +Rahul Gupta Did you ever get it to work? I have it installed but it's telling me it doesn't recognize gcc

  • @wajahatsardar3020
    @wajahatsardar3020 7 лет назад

    use dev-c++for c its the best one..

    • @tomy7424
      @tomy7424 7 лет назад

      You can't use some files like graphics.h and others, yes it is, but most of users should work with graphics in C that only works in Dos compilers.

  • @meetzaveri4733
    @meetzaveri4733 8 лет назад

    what for php and javascript???

  • @rashadasla748
    @rashadasla748 8 лет назад

    do you have build code for c ++?

  • @theadrenaline5327
    @theadrenaline5327 6 лет назад

    Can C# work with MinGw?

  • @futurebound1771
    @futurebound1771 4 года назад

    bro can you tell me how to do that same for c++

    • @cesarnontol
      @cesarnontol  4 года назад +1

      I'm sorry, I don't know. I did it just for C.

  • @nikecatalan2215
    @nikecatalan2215 7 лет назад

    what is your path?

  • @tabernadoorc
    @tabernadoorc 8 лет назад

    I got error in Sublime and Np++ lmao.....

  • @maridiaz6676
    @maridiaz6676 7 лет назад

    C#
    alguien sabe como hacerlo con c# ?

    • @IvanMartinez-ci3rx
      @IvanMartinez-ci3rx 7 лет назад +1

      {
      "shell_cmd" : "gcc $file_name -o ${file_base_name}",
      "working_dir" : "$file_path",
      "variants":
      [
      {
      "name": "Run",
      "shell_cmd": "gcc $file_name -o ${file_base_name} && ${file_path}/${file_base_name}"
      }
      ]
      }
      este me sirvió

  • @rouaneabdelkrim
    @rouaneabdelkrim 4 года назад

    i followed the same steps but its not working ?? any help

    • @rouaneabdelkrim
      @rouaneabdelkrim 4 года назад

      Gee thnx it just did thnx so much

    • @rouaneabdelkrim
      @rouaneabdelkrim 4 года назад

      beside i need java code does any one have it ? plz !

    • @rouaneabdelkrim
      @rouaneabdelkrim 4 года назад

      well its not working well same trilers it does compilated but most of the time it doesnt
      why ! !!!!

    • @rouaneabdelkrim
      @rouaneabdelkrim 4 года назад

      #include
      int main()
      { int n;
      float P;
      printf(" donner n
      ");
      scanf("%d", &n);
      P=n-2 9
      ;
      printf("la resultat est : ",P);
      return 0;
      }
      this is the programme that i tried but
      but its not calculating the result
      donner n
      9
      la resultat est :
      and thats it
      why !

  • @yakuza2163
    @yakuza2163 8 лет назад

    just use devc++ and get over with

  • @Nuked
    @Nuked 6 лет назад

    To me it wasn't able to find the executable so i changed the code like so:
    {
    "cmd": ["gcc", "-Wall", "-ansi", "-pedantic-errors", "$file_name", "-o", "${file_base_name}.exe", "&&", "start", "cmd", "/k" , "$file_base_name.exe"],
    "selector": "source.c",
    "working_dir": "${file_path}",
    "shell": true
    }