How to compile EPANET in C by Visual Studio 2017


Dear all,
I’m a beginner of coding and EPANET. I read the book"Using the Epanet toolkit v2.00.12 with different programming environments" written by Mr. Vegas. I ran the example of DEV-C++ and can get the same result with the book. Because my future work is combining our simulator(written in C++) with EPANET, I use Visual Studio 2017 to compile.
I want to use some example to practice,so I download the EPANET toolkit form
I keep getting errors and I can’t use the toolkit.

1)Does any can give me some materials to solve this problem?
2)If I want to run the EPANET source code in Visual Studio 2017, where I can find the step by step procedure.

Thank you everyone’s help.