I compiled the project and got a dll + lib files.
I also created a cpp file with the function implementation.
Next, I created a new project (in another solution), and I linked the DLL. I tried 2 methods:
1. right click on the client project (on solution explorer) -> properties -> Configuration properties -> Linker -> Input -> Adding the .lib file to the Additional Dependencies.
2. right click on the client project (on solution explorer) -> properties -> Configuration properties -> C/C++ -> General -> Adding the folder where the lib/dll files are located to the Additional include directories.
both of them were not helpful, and I can't use my dll exported function. Any idea what I'm missing?
Creating and using DLLs in the Visual Studio IDE is easier if you create separate projects in the same solution. After all, your app is dependent on the DLL,
For VS 2015:
Walkthrough: Creating and Using a Dynamic Link Library (C++)
https://msdn.microsoft.com/en-us/library/ms235636.aspx
There are walkthroughs for other VS versions available as well.
If you ever want to create a custom static library:
Walkthrough: Creating and Using a Static Library
https://msdn.microsoft.com/en-us/library/ms235627.aspx