You have forgotten to compile and link func.cpp to the DLL. A linker won't process .cpp or .h files. It's for .obj files only.