For Thesis Students: Visual INSTRUCTIONS FOR COMPILING SWMM5.DLL USING MICROSOFT VISUAL C++ 2010/2012

For Thesis Students:  Visual INSTRUCTIONS FOR COMPILING SWMM5.DLL USING MICROSOFT VISUAL C++ 2010/2012
=========================
The following is based on the readme.txt for compiling that EPA distributes with the SWMM5 install

1. Open the file swmm5.c in a text editor and make sure that the
   compiler directives at the top of the file read as follows:
       //#define CLE
       //#define SOL
       #define DLL   or the DLL will be created

2. Create a sub-directory named VC2010_DLL under the directory where
   the SWMM 5 Engine source code files are stored and copy SWMM5.DEF
   and VC2010-DLL.VCPROJ to it.

3. Launch Visual C++ 2010 and use the File / Open command to open
   the VC2010-DLL.VCPROJ file.

4. Issue the Build >> Configuration Manager command and select the
   Release configuration.

5. Issue the Build VC2010-DLL command to build SWMM5.DLL
   (which will appear in the Release subdirectory underneath the
   VC2010-DLL directory).

NOTE: The VC-2010 project file includes Open MP support which is
      only available with the Professional and higher versions of
      the compiler.

A SmartArt view of the process


How it looks in the Windows directory

C:\SWMMandSoftware\VisualStudioSWMM5\swmm51010_engine\VC2010_DLL

Arbitrary Windows directory name with a Subfolder of the SWMM 5 engine followed by a Subfolder called VC2010_DLL with files SWMM5.DEF
   and VC2010-DLL.VCPROJ


How it looks in Visual Studio 2012

And here is how it compiles right away
1>  Generating Code...
1>  Compiling...
1>  shape.c
1>  snow.c
1>  stats.c
1>  statsrpt.c
1>  subcatch.c
1>  surfqual.c
1>  swmm5.c
1>  table.c
1>  toposort.c
1>  transect.c
1>  treatmnt.c
1>  xsect.c
1>  Generating Code...
1>     Creating library C:\SWMMandSoftware\VisualStudioSWMM5\swmm51010_engine\VC2010_DLL\Debug\VC2010-DLL.lib and object C:\SWMMandSoftware\VisualStudioSWMM5\swmm51010_engine\VC2010_DLL\Debug\VC2010-DLL.exp
1>  VC2010-DLL.vcxproj -> C:\SWMMandSoftware\VisualStudioSWMM5\swmm51010_engine\VC2010_DLL\Debug\VC2010-DLL.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

If you want the Release version use Build/Release


Note on April 28, 2017 - I am including a link to a zip file of a working directory in VS 2012 and the directory C:\SWMMandSoftware\swmm51012_engine
You can download the entire directory (working using this link) http://blog.innovyze.com/wp-content/uploads/2016/09/swmm51012_engine.ziphttp://blog.innovyze.com/wp-content/uploads/2016/09/swmm51012_engine.zip

Comments

  1. Note on April 28, 2017 - I am including a link to a zip file of a working directory in VS 2012 and the directory C:\SWMMandSoftware\swmm51012_engine

    You can download the entire directory (working using this link) http://blog.innovyze.com/wp-content/uploads/2016/09/swmm51012_engine.zip

    ReplyDelete

Post a Comment

Popular posts from this blog

Orifice and Weir flow calculations

SWMM 5 Error Messages

EMC Washoff in SWMM5