I tried to create a dll with Visual C++ 2012 by following this walkthrough, but I failed. When I tried to import built dll in a different project as a reference, I got this error: A reference to '***.dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.
I don't understand what my mistake is in code and why I get this error. Here is my header and cpp file:
DLLEXPORT.H
__declspec(dllexport) bool setMute();
__declspec(dllexport) bool setActive();
DLLEXPORT.CPP
#include "DLLEXPORT.H"
bool setMute(){
//some stuff
}
bool setActive(){
//some stuff
}
Moreover, I also tried to solve the problem by this solution, but I got this error: TlbImp : error TI1002 : The input file '****.dll' is not a valid type library.