A Function Declared Dllimport May — Not Be Defined [verified]
You are trying to export/import a template class or function incorrectly. How to Fix It: The Macro Switch
You are using the same header file for both building the DLL and consuming it, but your macros aren't switching correctly. a function declared dllimport may not be defined
MYLIBRARY_API void MyFunction();