This very simple chunk of EPANET 3 code does not seem to work. I’m hoping someone who has gotten the EPANET 3 library to work (or anyone for that matter) can tell me where I went wrong.
As you can see, it returns an error code and crashes after I try to load a project. The error code, converted to hexadecimal, is C000 0005, which appears to refer to an access violation.
I’m sure the path to the INP file is correct.
I built the code from the epanet-dev github using the instructions for Windows & Visual Studio.
Moreover, I’m using Visual Studio 2017 Community with CMake 3.17.3 and MSBuild version 220.127.116.114.
I added the .lib file to the project, added its path to the Library Directories in Properties, and added the .dll file to the Environment section under Properties->Debugging. (As well as put the .dll file in the same folder as the solution.)
Any help would be greatly appreciated.