Тёмный

How-To Create And Use A DLL (Dynamic Link Library) with C++ MSVC Visual Studio 2019 Walkthrough 

Code, Tech, and Tutorials
Подписаться 24 тыс.
Просмотров 110 тыс.
50% 1

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 65   
@muhammadshahpaal6325
@muhammadshahpaal6325 2 года назад
i did all the steps repeatedly correct watching your video, still its giving me error that "Cannot open file CompilerLibrary.lib" its my file name. i have made a dll project for that which includes the CompilerLibrary.h and .cpp implementation files
@jevsdisjava
@jevsdisjava 3 года назад
it look like you are good at teaching those who already know.
@CodeTechandTutorials
@CodeTechandTutorials 3 года назад
I try
@klyper
@klyper 3 года назад
@@CodeTechandTutorials yo, not sure if homie was trying to burn u or not, but just for the record: THANK YOU for this video.
@bestganesh
@bestganesh 3 года назад
Disappointed... Wanted to know how exactly DLL works with C++. :(
@CodeTechandTutorials
@CodeTechandTutorials 3 года назад
I could probably do a video just explaining that at some point, I guess I did sort of skip over it and went straight to business here.
@serg2104
@serg2104 3 года назад
a dll is used to create different libraries. yes, there are libraries like iostream and vector, but with dlls, you can add whatever you want. iostream is mainly used for the console (command prompt or terminal) but dlls can be used not only on c++ and it can be used to create apps or whatever. hope this helped i guess
@KrisRay-j9d
@KrisRay-j9d 8 месяцев назад
Great video! Just an FYI, you can create a whole new solution by doing a "File->New->Project" and it'll take you straight to the "create project template" screen you get when you first start up MSVS and it'll create it as a completely separate Solution. Kudos to the video!
@nameredacted1157
@nameredacted1157 5 месяцев назад
This was a huge help, thank you!
@yy-ll1uw
@yy-ll1uw 2 года назад
Completely off topic, but your voice is REALLY attractive.
@berkerozbayar5072
@berkerozbayar5072 3 года назад
Hi. How can i copy code from github and make that thing to dll can you help me ?
@boom5935
@boom5935 2 года назад
Thanks, saddly i can't use Visual Studio, idk why, but it cannot compile not even a hello world program on it
@rei1534
@rei1534 9 месяцев назад
I dont understand can someone please help me? to get my DLL from visual studio I went to France, but upon seeing it, there was only black and white text. Is this because I am stupid and should have gone to Germany instead? or would GreenGoose API give me the X location on the map in order to find the hidden treasure? Thank you for understanding 🤝
@galileogalilei725
@galileogalilei725 4 месяца назад
when i type dinamic on visual studio doesnt find anything, i have no option
@zeldaoot23
@zeldaoot23 Год назад
Weirdly, even though I specify the directory that contains the FibLibrary.h in the FibClient project's Include Directories, Visual Studio can't find the header file. Is there any reason this might be happening? I've checked the directory multiple times, and the FibLibrary.h file is present. Tried both relative path and absolute path, and still no dice. Should be extremely simple, so this is frustrating. EDIT: I solved the problem by closing the project, deleting the .vs directory from the FibClient project folder, and re-opening the FibClient project.
@Gerisk
@Gerisk 2 года назад
I can't find the dynamic link library; it's just not showing up for me.
@ke3wik
@ke3wik 3 года назад
thank
@lukenukem8028
@lukenukem8028 3 года назад
You didn't link in your description the URLs.
@noam190
@noam190 3 года назад
thanks a lot man
@GokdenizCetin
@GokdenizCetin 9 месяцев назад
Thank you
@samdavepollard
@samdavepollard Год назад
Many Thanks. If I'm understanding correctly (not a given since I'm a noob) the Post Build macro thingy at the end copies the .dll for us, into the same folder as our .exe, but this means we end up with a copy of the .dll in each and every project. Is there some way we can tell Visual Studio where the .dlls files reside and have Visual Studio pass that info to the exe? (I know I can add the path to the .dlls to my Path environment variable, and that works fine, but just wondering if I can give VS an explicit link to the .dlls?) Thanks again.
@AaronLynch-g5y
@AaronLynch-g5y 7 месяцев назад
the post build doesn't work like that if the dll isn't found in the first directory you gave it'll activate the macro to look for it brings it over to your exe folder, as long as the dll remains where it is it won't copy it again, that's my understanding :/
@matanvinkler71
@matanvinkler71 3 года назад
Do I need to do that every time I create a new project?
@TipsJazzInferno
@TipsJazzInferno 2 года назад
No
@Northous
@Northous 3 года назад
this guide did not work i did everything you said and did and i still send i was missing the lib file after i followed your step to correct the error and the folder file were correct smh
@davidpower635
@davidpower635 3 года назад
Thank you for this. You were very easy to follow and you walked through the MS documentation which was helpful. Don't be put off by they negative comments - there are a lot of ungrateful arseholes on the internet. I code in Excel VBA as it is very easy to do but when it comes to unwieldy calculations it falls down badly. C++ is very hard to get to grips with at first but, having learnt Pascal then C decades ago I can understand why. I started programming with machine language (ZX Spectrum) and we used to make up useful functions to speed up our programming. I seem to recollect that early C had this facility and I think that's how it originated. That was 40 years ago. Thank you once again.
@wanderingpalace
@wanderingpalace 2 года назад
vba sucks lmao
@Lippeth
@Lippeth 3 года назад
I can levitate birds but no one seems to care.
@neweins8864
@neweins8864 2 года назад
I'm just seeing .dll but not .lib file in debug folder.
@weluvmoonrock5026
@weluvmoonrock5026 4 года назад
I am very very stupid, I found a .dll file but I found the source as a Visual Studio file so i opened it up and changed one line of code what timestap would help me now export it as a .dll?
@harryshuman9637
@harryshuman9637 3 года назад
build it?
@philipgeorgiev3240
@philipgeorgiev3240 3 года назад
thanks
@rei1534
@rei1534 9 месяцев назад
☝One small note: my dll says it is 14 in the editor but this will cause problems after many releases. to fix this error you will have to change keyboard input to traditional chinese. It will allow your DLLs to become multi-continental and therefore better carbon footprint.
@tzgardner
@tzgardner 2 года назад
3:00 If you are creating a dll library, why would you need the dllimport on line 7?
@velvethamster9809
@velvethamster9809 Год назад
Dllimport is there because when you include header files to load a dll to your project, it will import the implementations of the header file you included in your project from the dll.
@sajjadbaloch3738
@sajjadbaloch3738 Год назад
Is it Explicit linking?
@velvethamster9809
@velvethamster9809 Год назад
No, it’s implicit linking. Explicit doesn’t need header files or .lib files.
@jahamez6960
@jahamez6960 3 года назад
For some reason my visual studio doesnt have any templates.Can anyone help me?
@CodeTechandTutorials
@CodeTechandTutorials 3 года назад
You have probably deleted the folder that stores them.
@ducduong6328
@ducduong6328 Год назад
I can help you
@zcq0730
@zcq0730 2 года назад
Thanks a lot for the excellent video! Made very easy to follow.
@xdsumi
@xdsumi 4 года назад
ty this helped a lot!
@TheMrFaceslasher
@TheMrFaceslasher 4 года назад
How would you do this in the same project?
@CodeTechandTutorials
@CodeTechandTutorials 4 года назад
If it's in the same project a static Library would be better. Dll's are more to be shared between many projects
@TheMrFaceslasher
@TheMrFaceslasher 4 года назад
@@CodeTechandTutorials okay, just wondering. Thank you for your video. Legitimately helped me.
@CodeTechandTutorials
@CodeTechandTutorials 4 года назад
Happy to hear it helped. I do appreciate the question. As long as you link it and have the headers you can have it in the same project essentially the same as a static Library
@davidpower635
@davidpower635 3 года назад
Just one more comment. This works fine on the command line as you have shown us but I can't get it going in Excel. I just get the file not found message even though it does exist. I have scoured the internet and there are a miriad of so called solutions, none of them apply to me. Perhaps a video on that would be cool. It seems to be a referencing problem I believe. Thank you.
@Stopinvadingmyhardware
@Stopinvadingmyhardware 2 года назад
Who asked for it? Fuck off
@evan3678
@evan3678 2 года назад
You should have called it Fiblib. Missed opportunity.
@ryseran
@ryseran 2 года назад
Hey, what toolset do I need to install for .dll?
@zorfporf3078
@zorfporf3078 2 года назад
c++
@yashkanojiya9216
@yashkanojiya9216 Год назад
No explanation just copy and past ,waste of time
@hazeshade5373
@hazeshade5373 4 месяца назад
fiblib
@mr-maschi
@mr-maschi 12 дней назад
You explained nothing! Downvote
@trizensawol
@trizensawol 10 месяцев назад
No difference with reading microsoft tutorial. Thought I could find more info about class compilation there but no
@lewitch09
@lewitch09 Год назад
Header File Code: // MathLibrary.h - Contains declarations of math functions #pragma once #ifdef MATHLIBRARY_EXPORTS #define MATHLIBRARY_API __declspec(dllexport) #else #define MATHLIBRARY_API __declspec(dllimport) #endif // The Fibonacci recurrence relation describes a sequence F // where F(n) is { n = 0, a // { n = 1, b // { n > 1, F(n-2) + F(n-1) // for some initial integral values a and b. // If the sequence is initialized F(0) = 1, F(1) = 1, // then this relation produces the well-known Fibonacci // sequence: 1, 1, 2, 3, 5, 8, 13, 21, 34, ... // Initialize a Fibonacci relation sequence // such that F(0) = a, F(1) = b. // This function must be called before any other function. extern "C" MATHLIBRARY_API void fibonacci_init( const unsigned long long a, const unsigned long long b); // Produce the next value in the sequence. // Returns true on success and updates current value and index; // false on overflow, leaves current value and index unchanged. extern "C" MATHLIBRARY_API bool fibonacci_next(); // Get the current value in the sequence. extern "C" MATHLIBRARY_API unsigned long long fibonacci_current(); // Get the position of the current value in the sequence. extern "C" MATHLIBRARY_API unsigned fibonacci_index();
@raulgalets
@raulgalets Месяц назад
goated. just what I needed
Далее
Creating C++ DLL and using it in C#
26:09
Просмотров 32 тыс.
C++ Dynamic Linking vs Static Linking
15:06
Просмотров 106 тыс.
Using Dynamic Libraries in C++
10:07
Просмотров 237 тыс.
Making Simple Windows DLL in C
2:51
Просмотров 16 тыс.
Using Libraries in C++ (Static Linking)
18:43
Просмотров 439 тыс.
How to Create a C++ dll in visual studio 2019
17:38
Просмотров 19 тыс.