C++ Dynamic Linking vs Static Linking

preview_player
Показать описание
Dynamic linking leaves library code external to the resulting EXE, thus we link at runtime to the DLL file. Whereas with a static LIB file, the instructions are copied into the end EXE.
Рекомендации по теме
Комментарии
Автор

Over 7 years later and this is still very helpful. Thanks!

ryandetzel
Автор

Got to say, this is the first time I had a clear understanding of dynamic vs static. You're a great teacher :)

TheSpicySimon
Автор

What a struggling to understand for a long made DLL concept look soo simple and clear....Thanks a lot :)

arpit
Автор

1.I was in the middle of writing my BSc thesis and needed clarification about static vs dynamic linking (haven't programmed in c++ for a while).
2.google -> static vs dynamic linking -> youtube pops up
3.Watched this - perfect and easy explanation!
4.Alright, let's go back and carry on my work. But wait, there's a playlisty about c++ compilation - I wonder if I still got all compilation concepts down.
5.Watched rest of the c++ compiling playlist - awesome videos and It turned out I actually learned some new stuff too!
6.Spent rest of the evening watching all your videos.
7.Realised I have no more time to finish my thesis and have to show it to my teacher in incomplete state

So yeah... thanks :D

hansoloLDZ
Автор

After watching many videos in YouTube searching for the difference between Static and Dynamic libraries. Here comes the "BEST". You nailed it @Jamie King. Keep up the good work.

santoshkumartandrothu
Автор

You're a great teacher, that was a wonderful explanation, and definitely funny too lol. I wish my professors taught like you, going to watch more of your videos. Earned a new subscriber.

chrissmith
Автор

This is the most straight forward explanation I have heard. Thank you!

Drew_Summerfield
Автор

This is now a good example of static vs dynamic linking at all. In fact, it's wildly misleading in some cases. I do appreciate the effort though.

There's a fundamental difference between statically linking a .lib file and statically linking against a .dll file. Firstly, if you're statically linking against a lib, you don't need to dllexport the functions you want to expose. If you're creating a .dll file then that's where you need dllexport to export the calls in the dll. If you're dynamically loading the dll, then you'll use LoadLibrary(), GetProcAddress() to get handles to the functions of the dll. However, you can also statically link against a dll.

thewelder
Автор

6 years later... same for me... needed to lock it in after a long time of being semi-locked in... Thanks Jamie!

clearwavepro
Автор

This has to be one of the best explanatory video for DLL's !! i was just starting to write a code after 2 years....this helped me soo much .. Thanks Jamie !!

sang
Автор

Really loving the vids Jamie, top notch info. Just want to note for anyone else, the __declspec(dllexport) prefix is only needed if you plan on building said library as a DLL, for static ones it can be omitted.

jamesmurphy
Автор

absolutely amazing . You just make everything as clear as possible . Examples are great and easy to gasp . Thank you anyways for your great works .

TuNguyen-oxlt
Автор

This video aged well. Amazing explanation Jamie

leonlysak
Автор

still the best explanation on internet for the static/dynamic linking

SanmathiBharamgouda
Автор

Thanks a lot for this very clear explanation and for pointing out the difference of static vs. dynamic libraries. Helped me out a lot.

doctorfu
Автор

I think this was just what I needed to understand how to eliminate DLLs from my project so it can be run on a platform not designed to use DLLs.

halotroop
Автор

Thanks Jamie, your video makes my mind clear about what the difference DLL and lib. This is so cool

backend-Engineer
Автор

Absolutely killed it!!! Perfect demo! Ty, will definitely share your content!

jackbutler
Автор

This video cleared up a lot of my confusion on linking. Super helpful, thanks!

JetNmyFuture
Автор

That was the best explanation I've ever heard! Had it's fun moments too. Good job!

elelec