how to let the h and cpp talk to each other? : I am trying to Creating and Using a Static Library using the official examples

https://msdn.microsoft.com/en-us/library/ms235627.aspx

but i find the cpp file just can not get connected with the class definitions in the h file.

I get the error messages: ...is not a class or namespace everywhere?

Could you help me with this?
this is the c file

    #include "MathFuncsLib.h"
    #include "stdafx.h"
    #include <stdexcept>
    
    using namespace std;
    
    namespace MathFuncs
    {
    	double MyMathFuncs::Add(double a, double b)
    	{
    		return a + b;
    	}
    
    	double MyMathFuncs::Subtract(double a, double b)
    	{
    		return a - b;
    	}
    
    	double MyMathFuncs::Multiply(double a, double b)
    	{
    		return a * b;
    	}
    
    	double MyMathFuncs::Divide(double a, double b)
    	{
    		return a / b;
    	}
    }
this is the h file

    #pragma once
    namespace MathFuncs
    {
    	class MyMathFuncs
    	{
    	public:
    		// Returns a + b
    		static double Add(double a, double b);
    
    		// Returns a - b
    		static double Subtract(double a, double b);
    
    		// Returns a * b
    		static double Multiply(double a, double b);
    
    		// Returns a / b
    		static double Divide(double a, double b);
    	};
    } 

