The issue is with

    __declspec(dllexport) void func();
    void func() // generates C4273 warning
    {
    }

which is basically saying "hey, you first said you're exporting this out from a DLL, but now you're defining it as if it's not part of the public DLL api, so which one is it? I'm going to assume you wanted it in public DLL and treat the definition as dllexport as well, but you need to be consistent."

The proper form is

    __declspec(dllexport) void func();
    __declspec(dllexport) void func()
    {
    }