I have managed to successfully create a C++ executable that references a C++ DLL using this tutorial: http://programmingexamples.wikidot.com/blog:1.
I am a .NET Developer. Using .NET you simply add a reference to the DLL from the console project. Using C++, you have to perform three steps (all in step four contained in the link). My questions are:
1) Why do you have to add the LIB as an Additional Dependency (step 4, part 1). I believe it acts as a stub for the DLL, which is the skeleton. This is not needed using .NET.
2) Step 4 (part 2) asks you to move the DLL to the same directory as the calling program. Do you8 have to do this for every calling
program? I assume that if you add a reference to the DLL
(Properties/Common Properties/Add New Reference) that this step is not
needed?
3) Step 4(part 3) states that you must specify the location of the header files. Why is this step needed if the header files are part of the DLL. Is this because they are precompiled?
I understand that C++ and Visual Basic.NET/C#.NET are two completely different languages, however I do not yet understand why these additional steps are needed.