How to Compile and Run C program Using GCC on Ubuntu (Linux)

Поділитися
Вставка
  • Опубліковано 8 лис 2024

КОМЕНТАРІ • 184

  • @HungryGuyStories
    @HungryGuyStories 4 роки тому +158

    Thank you for this! Short and to the point without telling us your life history for an hour before getting to the important bits! :-) Thank you again! :-)

  • @abelincolnparth
    @abelincolnparth 4 роки тому +13

    For many users on Linux this does not work, but it is easily fixed. The GNU GCC does not have the stdio.h, math.h and stdlib.h files included. They however can be found in the usr/include directory. Just copy those files into whatever directory where you are writing and running you c or c++ programs.

  • @angshulsana
    @angshulsana 6 місяців тому +26

    I don't understand why the hell did they use this Ubuntu in my college

    • @tudorboscu8275
      @tudorboscu8275 Місяць тому

      i am starting tomorrow the first course and i just learnt that we will be using ubuntu lol:)

  • @user-vg5zx4lx8m
    @user-vg5zx4lx8m 2 роки тому +2

    thanks for this tutorial, i just wrote my first c application but needed to compile it to run it

  • @IanoNjuguna
    @IanoNjuguna 2 роки тому

    I'm here because I want to familiarise with the terminal and this is really helpful.

  • @kostasbobos6209
    @kostasbobos6209 4 роки тому +47

    everything in linux is more complex than any other operating system, more difficult and this is the reason that hasn't much fans

    • @sidheshwartiwari9834
      @sidheshwartiwari9834 3 роки тому +7

      You will get used to it.

    • @BrandonMeyer1641
      @BrandonMeyer1641 8 місяців тому +4

      If you’ve been coding before moving to Linux it really isn’t bad. Doing things in Linux is 10x better than dealing with the windows subsystem for Linux. If that’s what you’re used to, a clean install of Linux is like a breathe of fresh air.

    • @supergremlin1494
      @supergremlin1494 8 місяців тому +3

      I found it better than windows tbh

    • @veerverma5586
      @veerverma5586 2 місяці тому +3

      Cause you are more familiar with windows

  • @散华-l9m
    @散华-l9m Рік тому +1

    thank you sir, it's much better than the courses in my universities. even top universities will teach us in a trashy way

  • @francisparisi1652
    @francisparisi1652 4 роки тому +6

    Thank you again for your videos. Always helpful, clear and well presented!

  • @JamesBrodski
    @JamesBrodski 4 роки тому +12

    Thank you so very much! I will need to do this for my computer class. You're amazing!

  • @Suyongi
    @Suyongi 3 роки тому +1

    I find U whenever I need some help using Ubuntu. Wow who are U?

  • @safrullahsafrullah7999
    @safrullahsafrullah7999 3 роки тому +2

    Thank You. It really help me as a beginner.

  • @josephcunningham9806
    @josephcunningham9806 2 місяці тому

    You are amazing, I'm so happy this video graced my monitor! Have a great day!

  • @mlkwy
    @mlkwy 3 роки тому

    Thank you, you are better than my professor

  • @CryptofreakJasim
    @CryptofreakJasim Рік тому

    Thanks literally saved me from a break down

  • @lqtx96
    @lqtx96 3 роки тому

    Thank you for the great video! This is my first step onto Linux path!

  • @nimeshsingh6229
    @nimeshsingh6229 3 роки тому +1

    Ur vedios are so helpful

  • @abhiraj2005
    @abhiraj2005 Рік тому

    Thank you sir, it works perfectly fine. Was looking for a way. Mnay many thanks.

  • @simplelyf4072
    @simplelyf4072 2 роки тому +1

    Very concise and well done than u!!!

  • @kishordave6474
    @kishordave6474 4 роки тому +1

    Thank you so much. You save my practical marks. Once again thank you very much.

  • @akankshipriya9380
    @akankshipriya9380 4 роки тому +1

    Best Video ❤....the content is to the point

  • @HPPCUDA
    @HPPCUDA 4 роки тому

    Nice sir it's knowledgeable to us.....very good

  • @TecICTian
    @TecICTian 3 роки тому

    Good explanation and demonstration

  • @2claudiohenriques1
    @2claudiohenriques1 4 роки тому +2

    Thanks bro, I checked a few pages on google, but none of them mentioned the last part, with the ./executable

  • @TheBananaman-sg4xd
    @TheBananaman-sg4xd 11 місяців тому

    could have been faster but I found what I was looking for. Like.

  • @premanjalsharma9878
    @premanjalsharma9878 6 місяців тому

    Thankyou so much.
    Hare Krishna 🙏🏼🪔

  • @lisawaran4878
    @lisawaran4878 3 роки тому +1

    Such a great demo..thank you so much

  • @imaneousalah
    @imaneousalah 2 роки тому +1

    Thanks a lot 👍👍👍

  • @codebykeoma
    @codebykeoma 2 роки тому +1

    Thank you!

  • @nevadainformation2039
    @nevadainformation2039 4 роки тому

    Thank you alot, this works 1:1on newest debian too

  • @AbhinavKumar-dr4ef
    @AbhinavKumar-dr4ef 3 роки тому

    Simple and clear. Thank you.

  • @MpSniperM1911
    @MpSniperM1911 4 роки тому

    Your accent is understandable

  • @manju-ep7nj
    @manju-ep7nj 3 роки тому

    thank you very much sir.....it helped me alot

  • @berizzian
    @berizzian 4 роки тому +3

    great tutorial, fast and useful.

  • @Diego-nx8fj
    @Diego-nx8fj 5 років тому +9

    Thank you so much, it works perfectly.

  • @gekotagirl
    @gekotagirl 6 місяців тому

    holy crap was this a life saver

  • @raj.kathayat
    @raj.kathayat 2 роки тому

    Iam leaving this comment for just when someone in problem can take advantage of it,,,,,

  • @aeromaxiiyt7059
    @aeromaxiiyt7059 3 роки тому +1

    Tqsm sir

  • @marcelogalindo4566
    @marcelogalindo4566 2 роки тому

    Thank you so much, you saved my night

  • @gateaspirant2024
    @gateaspirant2024 5 років тому +2

    Love u bro thanks a lot ...
    I know what benefit I get your this lecture....
    I hope very soon your subscribe 2M

  • @SSR-14
    @SSR-14 29 днів тому

    thx man it was a big help

  • @NaderehArvin
    @NaderehArvin Рік тому

    You are wonderful bro❤

  • @ep911300
    @ep911300 5 років тому +1

    i am not a programmer, i just want to compile this program i have downloaded from the internet. what it wants to achieve is to booth the pc from an iso image which then can install a 64 bit OS

  • @rosstodorovic4438
    @rosstodorovic4438 Рік тому

    Very nice video... thanks

  • @aamilworld1091
    @aamilworld1091 3 роки тому

    very use full video

  • @j.m5888
    @j.m5888 4 роки тому +1

    Great video, very helpful! Thanks a lot for building community!

  • @rajibchakraborty1151
    @rajibchakraborty1151 2 роки тому

    Thank you Sir.

  • @iranikarunanayake7065
    @iranikarunanayake7065 4 роки тому +1

    Thanks ! This helped me

  • @gabrielleigloo
    @gabrielleigloo 3 роки тому

    So clear, thank you

  • @KawaiiDEsuMoemoeKyun
    @KawaiiDEsuMoemoeKyun 2 роки тому +2

    THANK YOU!!! You are a life saver!!

  • @bennguyen8124
    @bennguyen8124 Місяць тому

    what a saver,love yaaaa

  • @EF2000Typhoon7LWA
    @EF2000Typhoon7LWA 4 роки тому

    Why are indians the only people that make good tutorials?

  • @karcaz
    @karcaz 3 роки тому +1

    The following packages have unmet dependencies:
    build-essential: Depends: libc6-dev but will not install or
    libc-dev
    Depends: g ++ (> = 4: 9.2) but it won't install
    E: Problems could not be corrected, you have retained broken packages.

  • @sathviksrikanth7362
    @sathviksrikanth7362 Рік тому

    Thanks a lot dude!

  • @imalkagunasekara8725
    @imalkagunasekara8725 4 місяці тому

    Great

  • @rock20711
    @rock20711 Рік тому

    THANK YOU MAN

  • @AbhishekMishra-jm3dr
    @AbhishekMishra-jm3dr 3 роки тому

    Thank you

  • @titmonster
    @titmonster 2 роки тому

    my man
    thank you so much

  • @mahallati
    @mahallati 5 років тому

    Thank you. Very helpful.

  • @zkhan2023
    @zkhan2023 4 роки тому +2

    sir how to solve this problem ?
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package build-essential is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    • @aaysharasheed1915
      @aaysharasheed1915 4 роки тому

      Got the same issue cant find a solution

    • @zkhan2023
      @zkhan2023 4 роки тому +1

      I have forgotten the solution.but i will try to find the solution.

  • @pradyutmaji-BeyondThePages
    @pradyutmaji-BeyondThePages 4 роки тому

    You made my day.

  • @gsUPD
    @gsUPD 8 місяців тому

    COKE TSAKA JD !!! thanks bro

  • @antfarmmining7824
    @antfarmmining7824 2 роки тому

    Very good, thank you

  • @basil-1999
    @basil-1999 4 роки тому

    شكرا

  • @garammasala5967
    @garammasala5967 3 роки тому

    Thankyou 🤝

  • @Muslim10623
    @Muslim10623 Рік тому

    thanx a lot bro ❤❤❤❤

  • @josalt
    @josalt 4 роки тому

    thankyou

  • @yura2110
    @yura2110 2 роки тому

    great video, thank you

  • @mhascosta
    @mhascosta 3 роки тому

    Very helpful! Thanks :-)

  • @prathamgondane4611
    @prathamgondane4611 4 роки тому

    Sir which is better- Ubuntu Linux terminal or Turbo c++??

  • @sgracem2863
    @sgracem2863 3 роки тому +2

    When i run the gcc command I get a file that has an icon with gears on it instead of a text file. Why is this?

  • @al-pn1md
    @al-pn1md 2 роки тому

    thank you!

  • @vadimnave2283
    @vadimnave2283 4 роки тому

    Thank you sir!

  • @zkhan2023
    @zkhan2023 4 роки тому

    Thanks sir

  • @bolemnageswrarao3081
    @bolemnageswrarao3081 2 роки тому

    Hi, this is rohini. Actually my terminal didn't have a gcc
    I tried what u said. I mean i typed "sudo apt install build-essential".but it shows error.

  • @hassanal-lame8636
    @hassanal-lame8636 2 роки тому

    My friend I have a problem in kali-linux 👉 ( C compiler cannot be executables) how can I fixed
    I hope you answer me

  • @morgard211
    @morgard211 5 років тому

    Thanks.

  • @bluegiant13
    @bluegiant13 6 років тому +4

    That was easy, thanks.

  • @thaskael310
    @thaskael310 5 років тому

    Thanks!

  • @natsudrangneel3775
    @natsudrangneel3775 3 роки тому

    make a video on copy, paste enable

  • @shijasak1331
    @shijasak1331 4 роки тому

    Thank you so much brother

  • @swethasarang8657
    @swethasarang8657 4 роки тому

    Thanks

  • @nivertitisibuea9570
    @nivertitisibuea9570 2 роки тому

    thank you ya gess ya

  • @VinothKumar-zl2ht
    @VinothKumar-zl2ht 6 років тому

    Kudos

  • @shubhamparihar5517
    @shubhamparihar5517 3 роки тому

    Sir i am facing issue while entering sudo at video timing 1:48 it shows unable to locate package essential now wht to do?

  • @jacksheppard4907
    @jacksheppard4907 6 місяців тому

    Why do I need the "./" to get the program to run? If I leave this off, it doesn't work.

  • @itsme-tw3td
    @itsme-tw3td 2 роки тому

    Is there any IDE for c programming in Ubuntu?

  • @princewalia7365
    @princewalia7365 Рік тому

    How can we check for errors in the c program before saving the file?

  • @anon5119
    @anon5119 4 роки тому

    TL;DW -- gcc myfile.c -o outputFile
    Then run outputFile with the terminal command ./outputFile

  • @ayushtripathi8910
    @ayushtripathi8910 3 роки тому

    if sudo apt install build-essential also doesnot work, then what should we do?

  • @linguafranca7834
    @linguafranca7834 3 роки тому

    But it shows I've not created any test file.? It shows batch error.

  • @lordbornkis7483
    @lordbornkis7483 4 роки тому

    nice tutorial m8

  • @layeawandiaye6767
    @layeawandiaye6767 4 роки тому

    Excellent vidéo i like it i subscribe

  • @lobou7217
    @lobou7217 2 роки тому

    what command creates a header file

  • @kartikksrivastava5335
    @kartikksrivastava5335 5 років тому

    Thank u sir

  • @Urmilaa_
    @Urmilaa_ 3 роки тому

    Sir how did you copy and pasted?

  • @sumanrock3139
    @sumanrock3139 3 роки тому

    thank you soooooo much yaaaaaaaaaaaaaaaaarrrrrrrrrrrrrh

  • @harsh1813
    @harsh1813 5 років тому

    Thanks dude!!!

  • @sandeepkumarmamidala3006
    @sandeepkumarmamidala3006 5 років тому +1

    tq bro

  • @nicathasanli1
    @nicathasanli1 4 роки тому

    thanks man

  • @siebenvii
    @siebenvii 6 місяців тому

    I want to learn Vim but I think I'll stick to Python then