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
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
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!
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 🤝
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.
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.
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 :/
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
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.
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?
☝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.
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.
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
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.
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();