Difference between revisions of "Microsoft Visual Studio"

From Second Life Wiki
Jump to navigation Jump to search
Line 28: Line 28:
** Get the latest version (as of 29 Oct 2008) here: [http://www.microsoft.com/downloads/details.aspx?FamilyID=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en Windows SDK for Windows Server 2008 and .NET Framework 3.5]
** Get the latest version (as of 29 Oct 2008) here: [http://www.microsoft.com/downloads/details.aspx?FamilyID=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en Windows SDK for Windows Server 2008 and .NET Framework 3.5]
* '''DirectX 9.0 SDK'''
* '''DirectX 9.0 SDK'''
** Get the latest version (as of 29 Oct 2008) here: [http://www.microsoft.com/downloads/details.aspx?FamilyID=ea4894b5-e98d-44f6-842d-e32147237638&DisplayLang=en DirectX 9.0 SDK (August 2008)] '''NOTE:''' Installing to the default path may cause errors when develop.py checks for FMOD support.  Instead, install to a directory with no spaces in the path name, like "C:\DXSDK".
** Get the latest version (as of 29 Oct 2008) here: [http://www.microsoft.com/downloads/details.aspx?FamilyID=ea4894b5-e98d-44f6-842d-e32147237638&DisplayLang=en DirectX 9.0 SDK (August 2008)]


If you have previously installed an older version of the DirectX 9.0 SDK, remove it first (from Control Panel -> Add or Remove Programs) before installing this version.  Installing the new SDK "on top" of an older version may cause problems. Upon installing DirectX, it is sufficient to install only the '''Headers and Libs''' part.  Other DX development tools are not necessary.
If you have previously installed an older version of the DirectX 9.0 SDK, remove it first (from Control Panel -> Add or Remove Programs) before installing this version.  Installing the new SDK "on top" of an older version may cause problems. Upon installing DirectX, it is sufficient to install only the '''Headers and Libs''' part.  Other DX development tools are not necessary.

Revision as of 12:10, 6 February 2009

Setting up the Microsoft Visual Studio

This page describes installation and configuration properties for Microsoft Visual Studio (MSVS) as it relates to a development environment for Second Life.

Recognized MSVS versions include:

  • Visual Studio .NET 2003 Professional
  • Visual Studio 2005 Professional
  • Visual C++ 2005 Express
  • (Visual Studio/C++ 2008 is not covered yet.)

Download Express (optional)

If you do not already own one of the above recognized version, then you may download Microsoft's free IDE and compiler editions.

Click here to download Visual C++ 2005 Express

Make sure to apply the Service Pack 1 for the newly downloaded Visual C++ 2005 Express, since the one available through the above link seems a pre-SP1 installer. If you are using Windows Vista for development, you will need Visual Studio 2005 Service Pack 1 Update for Windows Vista, too.

Note that, although the latest version of Visual C++ Express Edition is 2008, it is recommended to use 2005 version for the purpose of Second Life development for the moment. This page will be updated when we get enough experiences on VC++ 2008.

Install Microsoft Platform & DirectX SDKs

Download and install:

If you have previously installed an older version of the DirectX 9.0 SDK, remove it first (from Control Panel -> Add or Remove Programs) before installing this version. Installing the new SDK "on top" of an older version may cause problems. Upon installing DirectX, it is sufficient to install only the Headers and Libs part. Other DX development tools are not necessary.

Setup the project globals

  • Start Visual Studio
  • Go to Tools > Options > Projects > VC++ Directories
  • Make sure that the includes and libraries paths ("Include files" and "Library files" in the "show directories for" dropdown) exist, and add them if they don't, in the following order: (see screenshots below)
    1. Platform SDK paths
    2. DirectX SDK paths
    3. Visual C++ paths
    • NOTE: The newest DirectX SDK ("December 2006") lib folder has two sub-folders, x64 and x86. Make sure your path goes to one of them (select lib/x86, not just lib), or you will get a Link error. For the Windows Platform SDK, there is not a subfolder for x86 (even though there are subfolders for AMD64, IA64, etc.), so do not select a subfolder for the Windows Platform SDK.
  • Also, make sure that your cygwin (default C:\cygwin\bin) and ActivePython (default C:\Python25) directories are under the "Executable files" dirs and moved to the bottom of the list. (Even if you update your PATH environment variable, those changes will NOT be reflected inside Visual Studio!)

Compiling the Second Life viewer

Refer to these topics on how to compile the viewer with Microsoft Visual Studio:

Following alternative methods are also available for experienced developers:

Screenshots

  • Example screenshot of Tools > Options > Projects > VC++ Directories > Includes files
MSVS2005 Global Project Options Include Files.JPG


  • Example screenshot of Tools > Options > Projects > VC++ Directories > Libraries files
MSVS2005 Global Project Options Library Files.JPG