Комментарии:
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.
can i link staticly non standard library with just g++ -Wall -o prog prog.cpp - static?
Ответитьi appreciate the video but could you not yell? no offense but it's very loud
Ответитьstill the best explanation on internet for the static/dynamic linking
Ответитьthinking about the energy wasted in typing 'using namespace std' and having to mention about it (how it is a bad practice) vs typing 'std::' I'd be curious to know why still do it.
Ответитьcan you please help me compile a bunch of fortran codes which create an EXE [ which does not report missing dlls]
ОтветитьI think I grew 100 brain cells. Great video!
ОтветитьBut your new dynamic library might have foo() instead of moo() and then you'd be in "dll hell" 😄
ОтветитьThis is the most straight forward explanation I have heard. Thank you!
ОтветитьI would love to see another video explaining the "static-dynamic" linking vs completely dynamic linking
Ответитьthanks I am not really a C(/++) programmer but it was quite comprehensive thanks for that.. and well btw.. you might should do smth against your sleeping problems doing such thing at 5.00 in the morning ;)
ОтветитьAmazing sir... just amazing...
ОтветитьHello Jamie, what if I (the comsumer of your library) use a way newer compiler than what you used to produce your lib and dlll files . Can there be an issue?
Ответить1/28/2021 Still works B)
ОтветитьAbsolutely killed it!!! Perfect demo! Ty, will definitely share your content!
ОтветитьOver 7 years later and this is still very helpful. Thanks!
ОтветитьWonderful explanation thank you so much!
Ответить6 years later... same for me... needed to lock it in after a long time of being semi-locked in... Thanks Jamie!
ОтветитьThis video aged well. Amazing explanation Jamie
ОтветитьYou are a good teacher!
ОтветитьThank you, Jamie
ОтветитьDoes the linker just ignore any unresolved references if I decide to link against a single dll file?
ОтветитьThat was soooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo friggin GOOD
ОтветитьAre there any benefits to statically linking over dynamically? Is it faster because the library is copied and pasted into the exe?
Ответитьstill helpfull in 2020
Ответитьnicely explained!
ОтветитьBest video ever
ОтветитьI was your 2^16th viewer for this video \o/
Ответить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.
Ответитьreally good explanation, damn! I understand it now!!!
ОтветитьGreat video! I have a question: where must the DLL be for the .exe to find it? always in the same folder as the .exe?
(It would also be great if you could explain us the implicit vs explicit linking within the dynamic-linking of libraries. Is it possible to link implicitly, if no .lib file is provided?)
Thanks Jamie, your video makes my mind clear about what the difference DLL and lib. This is so cool
Ответитьsir when i am compling the dll with this command
cmd : cl /LD /Main.dll Main.cpp
this is only generating the dll file not the lib file what is wrong
How am I Suppose To Link The exe with The Dll If There is no lib file ????
and one more thing the compiler says ignoring the unknown parameter /Main.dll
which I am supposing telling compiler the name of the dll File am I doing something wrong
if this video is not working for vs 2013 command line then please make a video for each and every version of vs(Visual Studio Express Version) { Low End Pc }
Hi Jamie King , you humor make complicated matters easy and cristal clear, After a year of hard working to understanD almost C++ Programming and compiling concepts ,I still feel that I don't hold really on Programming ! What do you counsel me to do? Thank you Beforehand
Ответитьthank you Jamie, it really helps me a lot.
ОтветитьThis video totally made sense...Could you do a video on threads?
Ответитьmooooooooooer
ОтветитьThanks Jamie. Cool video!
Ответитьabsolutely amazing . You just make everything as clear as possible . Examples are great and easy to gasp . Thank you anyways for your great works .
ОтветитьHey, great video lesson man!!
Question: in Static Linking Library, what are the files Mainer.exp and Mainer.lib for?
What happens if we delete .lib file in static linking??
ОтветитьVery nice thanks
ОтветитьAwesome video. Thanks.
Ответитьthank you that was a good explenation
Ответитьis visual studio mandatory?
ОтветитьVery good man... Very good!! :)
Ответитьwonderful video very helpful
Ответить