Working with MS Visual Studio 2005

The developer solution file gridlabd.sln that comes with the source code is in the VS2005 folder. After you open the solution in Visual Studio you can immediately do the first build, which takes several minutes to complete.

Afterward you first build, you can unload the cppunit and xerces-c projects because they will not need to be built again.

Generally, if you are debugging a module, you will need to specify the debug executable. If you are running on a system that has both a release and your development version, you must also add the following to your debugger environment. The configuration in Table 1 assume that the file are running is in the project test folder and all the output should go there too.

= Configuration options =

It may be necessary to include the follow code in your GLM file to get GridLAB-D to use MSVC.

// $Id$ // Copyright (C) 2008 Battelle Memorial Institute // Configuration to use when debugging GLM files with MSVC // set this to your MSVC installation folder // enable use of MSVC instead of GNUtools // this disables automatic rebuild suppression of runtime classes // compilation based on modification time // customize to your local setup
 * 1) setenv MSVC=C:/Program Files/Microsoft Visual Studio 8
 * 1) define use_msvc=1
 * 1) set force_compile=1
 * 1) setenv path=${MSVC}/Common7/IDE;${MSVC}/VC/bin
 * 2) setenv include=${MSVC}/VC/include
 * 3) setenv lib=${SystemRoot}/system32;${MSVC}/VC/lib;${MSVC}/VC/PlatformSDK/Lib

This code may be found in the  file and included using the GLM directive


 * 1) include "rt/debugger.conf"

on any Windows platform. It is possible that the contents of  need to be modified to match your system's particulars.