I am trying to figure out how to include a DLL I created in one of my projects, but every guide tells me to use a .lib file which I don't have. I am using Visual Studio 2019 and compiling in plain C.
I first used Visual Studio's DLL template to make my DLL file in x64. This resulted in my folder appearing like this...
Then I again used Visual Studio, but this time made a normal console application. I then first went into Properties -> C/C++ -> General -> Additional Include Directories and added the directory to MouseInput as show in image above. This then allowed me to include the "MouseInout.h" header file which worked fine. Next, I went Properties -> General -> Additional Library Directories and copied the path to the above Release directory. Lastly, I went Properties -> Input -> Additional Dependencies and tried adding MouseInput.lib (like most tutorials instruct you to do) but that failed and then I tried to just add MouseInput.obj but that also did not work.
Trying to build my console application results in a LINK2011 error saying, "precompiled object not linked in; image may not run" when I tried adding MouseInput.obj however, when I add MouseInput.lib (which just does not exist inside my project) I get a LINK1181 error saying, "cannot open file 'MouseInput.lib'". So, what exactly is the issue here? Where is my lib file?
Edit: I realized that I could go into my DLL's Configuration Properties -> General -> Configuration Type and change the project to a .lib file instead of a .dll file. However, from my understanding .lib is statically loaded, and I want it to be dynamically loaded. But there does not seem to be a way to use a dll without a lib so do I need to compile them separately? Will the code I have above work fine if I just include the dll in the same directory that the program was executed from?