Static vs. Shared Libraries

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 เม.ย. 2016
  • Static vs. Shared Libraries
    Instagram: / davex.tech
    Home: davidxiang.com
    Book: www.amazon.com/dp/B07D5QNGVZ
    Facebook Page: / davex.tech
    Twitter: / davex_tech
    Email: davex.inc@gmail.com
    #software #coding #softwaredevelopment #programming #howtocode
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 170

  • @konstantinrebrov675
    @konstantinrebrov675 4 ปีที่แล้ว +14

    Another pro to Dynamic Libraries is that they are Shared Libraries. If you have 80 different applications that depend on the dynamic library, they all call the same DLL at run time. They are SHARING the library. You do not have duplication of the library's code, and each executable only contains it's own code. This is why Dynamic Libraries are called Shared Libraries.

  • @belloemmanuel9399
    @belloemmanuel9399 ปีที่แล้ว +8

    You might've done this 6 years ago, but this is so well explained. You've just earned one more subscriber.

  • @takumab348
    @takumab348 8 ปีที่แล้ว +47

    Keep making the tech videos for noob like me. much appreciated

  • @RemiStardust
    @RemiStardust 8 ปีที่แล้ว +9

    You making this specific video is a good example of why the internet is so great! Thank you, glad you decided to talk about this. I've seen .dll files many times over the years, never knew (nor was curious to know) what they were.

  • @vivekpal7559
    @vivekpal7559 8 ปีที่แล้ว +3

    Real good stuff! Feels good to get the feel of how things work under the hood in general. Keep more such videos coming!

  • @armaandhanji2112
    @armaandhanji2112 6 ปีที่แล้ว +5

    Hey Dave, I hope you can keep making these tech videos. I played this video during one of my college's C# classes, and everyone in the class loved it. Hope you can keep making more, they're super useful and will make for a wonderful reference in the future to come back to!

    • @DaveXiang
      @DaveXiang  6 ปีที่แล้ว +2

      Nice! haha wow that's cool. Yea, I haven't made a technical video in awhile, I'll have to make one

  • @dhyey2316
    @dhyey2316 5 หลายเดือนก่อน +1

    Hands down best explanation of static and shared libraries. I much needed this video as I was struggling to understand this concepts.

  • @ronborneo1975
    @ronborneo1975 8 ปีที่แล้ว +4

    Keep making the tech vids. We love it

  • @NoleoTheDog
    @NoleoTheDog 2 ปีที่แล้ว

    Dave! You should keep making the tech videos. The simplicity of your explanation is splendid.

  • @JohannaLu
    @JohannaLu 6 ปีที่แล้ว

    I started watching your videos on sunday morning, when I was hungover ... that day changed my life... 😊

  • @sjsoulute7953
    @sjsoulute7953 ปีที่แล้ว

    This is the best explanation ive come across so far. Thanks!

  • @paintingmylifeawaify
    @paintingmylifeawaify 6 ปีที่แล้ว

    Subscribed! You are better at explaining these concepts than any professor I've ever had.

  • @brianmanden
    @brianmanden 7 ปีที่แล้ว +1

    Thank you for another great video Dave. Keep´em coming :)

  • @taylorz7875
    @taylorz7875 หลายเดือนก่อน +1

    you are so good at explaining things!thanks Dave

  • @jadsayegh6283
    @jadsayegh6283 7 ปีที่แล้ว +1

    Thanks for making this, very useful. We need more fundamentals like this

  • @lemontheme31
    @lemontheme31 6 ปีที่แล้ว

    Really dig your style of explanation. So calm and measured. I understood all of it. Thanks!

  • @RaffaeleApetino
    @RaffaeleApetino 6 ปีที่แล้ว

    This explanation was pretty much perfect. Thank you!

  • @erdoaNNN
    @erdoaNNN 6 ปีที่แล้ว

    Great video man, brilliant tone and explanation flow.

  • @deltashadow4154
    @deltashadow4154 6 ปีที่แล้ว +1

    Really good and simpler explanation. Thank you so much for this video. Subscribed !

  • @memoryzulu7890
    @memoryzulu7890 ปีที่แล้ว

    Great video. I now understand static and shared libraries more vividly. Thank you.

  • @dogactekman2288
    @dogactekman2288 7 ปีที่แล้ว

    thank you so much for those explanations. subbed!!!

  • @pascalmathias9336
    @pascalmathias9336 9 หลายเดือนก่อน

    I love how much easy you made understanding this concept. God bless you

  • @oscaralejandrobedoyaobando1955
    @oscaralejandrobedoyaobando1955 6 ปีที่แล้ว

    Me caiste bien amigo.
    Explicas de una manera espectacular, seguire viendo todos tus videos.
    Gracias

  • @vidhivadher9076
    @vidhivadher9076 3 ปีที่แล้ว +3

    Extremely thankful to you Dave!!...You explained such a complex things in such an easygoing way..keep making the tech videos🔥

  • @MinecraftGamer101010
    @MinecraftGamer101010 8 ปีที่แล้ว

    Thanks for the video, it's very educational! I also laughed a little when you told us about how you messed with some of the .dll files on your computer can bricked it as I also did that when I was a kid (was my first time seeing a blue screen).

  • @OnurTola
    @OnurTola 3 หลายเดือนก่อน

    You explained this topic beautifully, very clear and precise. Thanks Dave.

  • @anandareddy4931
    @anandareddy4931 7 ปีที่แล้ว

    Outstanding Explanation Dave Xiang..

  • @jsnmad
    @jsnmad 2 ปีที่แล้ว

    Your explanation about compile time versus run time loading of static library and shared library, respectively, was good.

  • @nawaryoussef
    @nawaryoussef 8 ปีที่แล้ว

    Thanks man, keep up the good work!

  • @JamesGaehring
    @JamesGaehring 8 ปีที่แล้ว +1

    I'm not learning any C-like languages (yet), but this helped me better understand what's going on when I have dependency issues of any sort, whether it's managing language versions, getting frameworks up and running, linux stuff, etc. This also clarified some differences between "compile-time" and "runtime". Thx!

    • @DaveXiang
      @DaveXiang  8 ปีที่แล้ว

      +James Gaehring glad it was helpful! thx

  • @rajcodes100
    @rajcodes100 4 ปีที่แล้ว

    Thanks Very much for this talk on libraries - you have touched on some cool points.

  • @lilcannedpeach
    @lilcannedpeach 4 ปีที่แล้ว

    10 minutes well spent thanks buddy

  • @marcuswilson1230
    @marcuswilson1230 5 ปีที่แล้ว

    dave Xiang is the man!!!! your videos are helping

  • @twisted6148
    @twisted6148 2 ปีที่แล้ว

    So who told you your videos on tech are shitty? This is the information I've spent close to 72 hours sourcing for. Great job!

  • @BODAPATISASIKANTHnullRA
    @BODAPATISASIKANTHnullRA 3 ปีที่แล้ว

    You have a really good accent. Simple and strait forward, Keep making tech videos for us! lol!!

  • @simpleblossom7441
    @simpleblossom7441 3 ปีที่แล้ว

    this has helped me so much! thank you! really appreciate it.

  • @andrewjoe1836
    @andrewjoe1836 2 ปีที่แล้ว

    Thank you for this video, you explained chapter 1 of my linux+ book very well!

  • @johneric2720
    @johneric2720 10 หลายเดือนก่อน

    I really love this video! Detailed explanation, you broke things down to the core.
    Thank you very much😃, I really enjoyed it👍

  • @rajcodes100
    @rajcodes100 4 ปีที่แล้ว

    Thanks Dave Xiang - very good explanation .

  • @janaro78
    @janaro78 19 วันที่ผ่านมา

    Great way of explaining it, thanks for video!

  • @ArunKumar-qo6zt
    @ArunKumar-qo6zt 4 ปีที่แล้ว

    Thank you so much for the introduction.

  • @leegaines2391
    @leegaines2391 6 ปีที่แล้ว

    You explained that very well. Thanks!

  • @Impulse_Photography
    @Impulse_Photography 5 ปีที่แล้ว

    I finally found you - - This is really good

  • @puremoth
    @puremoth 8 ปีที่แล้ว +25

    David, Im extremely grateful for what youre doing here for the newbie community. im about to undergo a web app development curriculum that stresses a slow path.. and their language of choice to teach is Ruby. do you have any opinions about Ruby as a first language?

    • @DaveXiang
      @DaveXiang  8 ปีที่แล้ว +5

      Ruby is a good first language for sure. Easy to write, easy to understand. Also, very popular with web programming.

    • @saadelmaaqili4051
      @saadelmaaqili4051 6 หลายเดือนก่อน

      Hello , I know it's been 7 YEARS, but in the Event that you see this, how did that curriculum workout for you?

  • @dfhayak
    @dfhayak 2 ปีที่แล้ว

    Thank you for explaining this so well.

  • @wadejbeckett
    @wadejbeckett 3 ปีที่แล้ว

    Thank you! This is a great supplementary video to LFS201.

  • @cid007007
    @cid007007 4 ปีที่แล้ว

    Learnt great stuff from your video that I was not able to answer in one of my interview and failed.. Thanks alot for such kind of stuff :)

  • @andreacacioli2612
    @andreacacioli2612 3 ปีที่แล้ว

    You explain things very well!

  • @v-ba
    @v-ba ปีที่แล้ว

    Cool explanation, thank you very much!

  • @TenderBug
    @TenderBug 4 ปีที่แล้ว

    Yeah Thank you, this is very concise explanation and cleared my doubts, which I didn't know to form a query to Google search.

  • @kariwattsup
    @kariwattsup 2 ปีที่แล้ว

    As a typical highly interested in the why of stuff. I was looking in my systems and was like ..shared storage my ass... then I cancel the clear data . I came to this and wow. You do really great at teaching. I am not in this field of expertise but l can say this...I understand a whole lot more about my phone now.
    You guys use us being connected so we help give strength to the core of this huge web of shared storage...interesting.
    That's kind of cool .
    what programming or developing... I think this was a good video. Dont ever give up or not do your desire. Tech is in need of your communication style. Keep up on this stuff.

  • @roberthensley7130
    @roberthensley7130 3 ปีที่แล้ว

    great conceptual explanation of it!

  • @ameyaupasani720
    @ameyaupasani720 7 ปีที่แล้ว

    excellent tutorials....i just love it...keep it up

  • @aver803bath261
    @aver803bath261 5 ปีที่แล้ว

    Great explanation. Thanks for sharing!

  • @ltecheroffical
    @ltecheroffical 5 หลายเดือนก่อน

    This video is 7 years old and it aged so well even now

  • @user-og6ol2im7v
    @user-og6ol2im7v 6 ปีที่แล้ว

    Very well explained. Thanks a lot!

  • @isaacphiri6187
    @isaacphiri6187 2 ปีที่แล้ว

    Very good and simple explanation. Easy to understand.

  • @HarishN24
    @HarishN24 7 ปีที่แล้ว

    Thanks for the great videos. Your videos gave a clear picture of what's going on under the hood..
    Can you please make a video on how linkers work, what are relocatable object codes and some info on symbol table in context of C program compilation.

  • @drwblkfact7286
    @drwblkfact7286 3 ปีที่แล้ว

    Thanks Dave!

  • @drishtidhamejani6609
    @drishtidhamejani6609 6 ปีที่แล้ว

    Subscribed after this

  • @devanshuvedios
    @devanshuvedios 7 ปีที่แล้ว

    Very nice video.. Tech videos rock!

  • @Nicxlive
    @Nicxlive 4 ปีที่แล้ว

    Great Video!!! Thank you, keep on please

  • @ankishamathur2625
    @ankishamathur2625 5 ปีที่แล้ว

    keep making tech videos :) & thanks for helping me

  • @leedenning4193
    @leedenning4193 4 ปีที่แล้ว

    Super helpful. Thanks man!

  • @davidFbeckham
    @davidFbeckham 4 ปีที่แล้ว

    Great explanation man, thank you

  • @ujjwalbansal1070
    @ujjwalbansal1070 2 ปีที่แล้ว

    Just to sum up using code:
    file.c
    #include
    int main(){
    printf("Hello");
    }
    If we compile this file using gcc then there are two ways either we use shared library to include printf() functionality or we use static library which include whole other bunch of function along with pritnf() which make our executable heavy...
    Simplely compile your above program in two ways:
    gcc -o output file.c
    gcc -o output2 -static file1.c
    And check the size of output and output2. Since output2 is statically compiled it size is greater then output file.

  • @ramvallabhsingh3518
    @ramvallabhsingh3518 5 ปีที่แล้ว

    very well explained, thank you very much.

  • @dadsggx56
    @dadsggx56 2 ปีที่แล้ว

    really solid explanation!

  • @user-or7ji5hv8y
    @user-or7ji5hv8y 5 ปีที่แล้ว

    that was a very good explanation.

  • @maniyataluja8658
    @maniyataluja8658 7 ปีที่แล้ว +1

    thank you.. learnt alot ❣️

  • @celineabessolo
    @celineabessolo 3 ปีที่แล้ว

    Thanks a lot for this !

  • @MsJavaWolf
    @MsJavaWolf 7 ปีที่แล้ว

    Man, don't care too much about views for any given video. Technical videos are much appreciated and you help a lot of people.

  • @tejeshB19
    @tejeshB19 7 ปีที่แล้ว

    awesomeness​ ... 👌👌👌👌 please continue making these tech videos... I'm finally understanding coding ..... thanks a lot !! please do complete tutorials on c# ....

  • @firedragonmangaming2410
    @firedragonmangaming2410 ปีที่แล้ว

    Great video, i understand clearly

  • @meetparikh8042
    @meetparikh8042 7 ปีที่แล้ว

    yes ! for me very helpful and understandable video.. thank you for sharing ...

  • @seyhangul1
    @seyhangul1 2 หลายเดือนก่อน

    Excellent explanation.

  • @luciocardoso6306
    @luciocardoso6306 8 ปีที่แล้ว +1

    +Dave Xiang I've recently discovered you channel, and I think it's one of the best of its genre. Thanks a lot for all the knowledge! I would really like if you could answer one question I have: I'm currently learning C (as a first language) on Linux, and I'm reading Stephen Prata's C primer plus. Should I continue reading it, or do you recommend me another book/course?

    • @DaveXiang
      @DaveXiang  8 ปีที่แล้ว

      +Lucio Cardoso Nice! C is an ambitious language to learn first but should be fruitful once you understand it. I don't know about that book personally, but just make sure you can differentiate from a "reference" style vs "curriculum" style book. I would get one for each. A curriculum you can easily follow, and a reference which you can index for specifics.

  • @Yhigma
    @Yhigma 7 ปีที่แล้ว

    I REALLY like the tech videos.

  • @rociofilgueira5059
    @rociofilgueira5059 6 ปีที่แล้ว +1

    Thank you!!!

  • @fahad9739
    @fahad9739 8 ปีที่แล้ว

    Thanks for the video

  • @balaganesh3440
    @balaganesh3440 3 ปีที่แล้ว

    dang! that's a headshot of explanation!

  • @damienw4958
    @damienw4958 5 ปีที่แล้ว

    I use static libraries when there is less duplicated code to not worry about run time dependencies, but if I have some code that most of the rest of my project(s) need, I bung it in a shared library.

  • @flowykitkat8177
    @flowykitkat8177 2 ปีที่แล้ว

    THANK YOU!

  • @snehakulkarni149
    @snehakulkarni149 5 ปีที่แล้ว

    Awesome .... thankyou so much

  • @JovenAlbarida
    @JovenAlbarida 6 ปีที่แล้ว

    good explanation, keep it up!

  • @abdAlmajedSaleh
    @abdAlmajedSaleh 8 ปีที่แล้ว +2

    subscribed
    after this

  • @logangraham2956
    @logangraham2956 5 ปีที่แล้ว

    sounds like for smaller applications at least (that use few libraries) static libraries is the way to go unless its libraries that you can almost garantee is already something the end user is using anyways.
    printing to console would be a good shared.
    but
    a highly customized graphics library might be better off as static.

  • @nagesh007
    @nagesh007 2 ปีที่แล้ว

    Awesome, Thanks

  • @Skybuildhero
    @Skybuildhero 7 ปีที่แล้ว

    It's a nice overview about these types of libraries, but you tend to repeat your structure sometimes.

  • @DanielShamany
    @DanielShamany 6 ปีที่แล้ว

    Can you make a video on how to link to the boost library, and perhaps how to use CMake in the terminal to do all that?

  • @carloslvm
    @carloslvm 7 ปีที่แล้ว

    Awesome, Do you know any book that explains libraries in details? I'm learning programming and I find this topic very confusing.

  • @gideongichamba
    @gideongichamba ปีที่แล้ว

    Thanks! this is helpful

  • @anelenoroita
    @anelenoroita 6 ปีที่แล้ว

    Thank you man.

  • @johnvesli2848
    @johnvesli2848 7 ปีที่แล้ว

    Really it's simply an awesome stuff..

  • @markrogers2760
    @markrogers2760 8 ปีที่แล้ว

    Keep Going!

  • @dhruvsharma9252
    @dhruvsharma9252 3 ปีที่แล้ว

    amaaaaaaaaaaaazing thx dave !!!!

  • @ehabnasr6925
    @ehabnasr6925 4 ปีที่แล้ว

    very informative thanks a lot.

  • @34521ful
    @34521ful 6 ปีที่แล้ว

    Hey Dave, great video! I had a quick question. In C, when you do #Include to get the printf function, would this be "static" since the preprocessor does a literal copy and paste of that entire stdio.h file on top of my other source code? if so, what would be an example of dynamic linking? Thanks again!

    • @DaveXiang
      @DaveXiang  6 ปีที่แล้ว +2

      when you do the #include you get a copy and paste of the header file. you still need to link w/ the implementations. you have a choice of dynamic vs static even for standard library just as you would custom library. most often, depending on OS and compiler defaults, the standard libraries will be a shared lib on the system somewhere. Like a library like... /lib/libc.so (something like that) Don't quote me on that, but you'll have the option of doing both. If you really want, you can also statically link contents from the standard lib into your executable.

  • @castel3564
    @castel3564 3 ปีที่แล้ว +1

    Although I might be wrong, but actually there is small mistake in your explanation. All the executable code or implementation of functions in particular library (at least in case C and C++) lies in DLL files. Bit in static linking of library in time of compilation a .lib file is used to find a needed function in DLL file, while in dynamic linking the process differs and a .lib file is not needed.
    So .lib files are for the static linking, but the actual code of library are contained in dll file in both cases.
    Its info on WIki:
    en.wikipedia.org/wiki/Dynamic-link_library

  • @sirraStudios
    @sirraStudios 8 หลายเดือนก่อน

    Really helpful , Thanks :)