PCSX2 Documentation/Compiling on Windows: Difference between revisions

Jump to navigation Jump to search
Line 110: Line 110:


==2. Configuring the Build Environment==
==2. Configuring the Build Environment==
Configuring the SDK Library and Include Directories Before PCSX2 will compile successfully, we need to ensure that all of the include, library, and header directories for the SDKs that we have installed are configured in our respective version of Visual Studio.
===Configuring the SDK Library and Include Directories===
Microsoft Visual Studio 2008 Standard Edition
Before PCSX2 will compile successfully, we need to ensure that all of the include, library, and header directories for the SDKs that we have installed are configured in our respective version of Visual Studio.
Navigate to your C:\Development\Project Source\PCSX2\ directory and double click on the pcsx2_suite_2008.sln Solution file. This will open Visual Studio 2008 and you will be presented with a screen that should look similar (it may not look exact) to the one here:
 
To access the configuration that we need to change, we will need to open the Tools menu and select Options from it.
====Microsoft Visual Studio 2008 Standard Edition====
Expand "Projects and Solutions" from the left-hand side and then select "VC++ Directories". This will bring up the dialog that allows you to modify the search paths for your VC++ solutions.
#Navigate to your C:\Development\Project Source\PCSX2\ directory and double click on the pcsx2_suite_2008.sln Solution file. This will open Visual Studio 2008 and you will be presented with a screen that should look similar (it may not look exact) to the one here:
#To access the configuration that we need to change, we will need to open the Tools menu and select Options from it.
#Expand "Projects and Solutions" from the left-hand side and then select "VC++ Directories". This will bring up the dialog that allows you to modify the search paths for your VC++ solutions.
  1 2 3
  1 2 3
Several changes need to be made here.
 
Under the Win32 Platform, you need to add the following to Include files:*If you installed GLEW elsewhere, reflect here
*Several changes need to be made here.
   $(DXSDK_DIR)\Include
*Under the Win32 Platform, you need to add the following to Include files:*If you installed GLEW elsewhere, reflect here
   <nowiki>$(DXSDK_DIR)\Include
   $(ProgramFiles)\NVIDIA Corporation\Cg\include
   $(ProgramFiles)\NVIDIA Corporation\Cg\include
   C:\Development\Add-on Libraries\GLEW\include
   C:\Development\Add-on Libraries\GLEW\include</nowiki>
Under the Win32 Platform, you need to add the following to Library files:*If you installed GLEW elsewhere, reflect here
Under the Win32 Platform, you need to add the following to Library files:*If you installed GLEW elsewhere, reflect here
   $(DXSDK_DIR)\Lib\x86
   <nowiki>$(DXSDK_DIR)\Lib\x86
   $(ProgramFiles)\NVIDIA Corporation\Cg\lib
   $(ProgramFiles)\NVIDIA Corporation\Cg\lib
   C:\Development\Add-on Libraries\GLEW\lib
   C:\Development\Add-on Libraries\GLEW\lib</nowiki>
Under the x64 Platform, I added the following for Library files:*NVIDIA Directory only available or necessary if compiling on a 64-bit OS
Under the x64 Platform, I added the following for Library files:*NVIDIA Directory only available or necessary if compiling on a 64-bit OS
   $(ProgramFiles)\NVIDIA Corporation\Cg\lib.x64
   <nowiki>$(ProgramFiles)\NVIDIA Corporation\Cg\lib.x64
   $(DXSDK_DIR)\Lib\x64
   $(DXSDK_DIR)\Lib\x64</nowiki>
That should finish up all of the search directory modifications required for PCSX2 to build properly. Now on to the next step!
That should finish up all of the search directory modifications required for PCSX2 to build properly. Now on to the next step!
Microsoft Visual C++ 2008 Express Edition
 
====Microsoft Visual C++ 2008 Express Edition====
Visual C++ 2008 Express Edition has several limitations not found in either Visual Studio 2008 Standard or Visual Studio 2010 Professional. Because of this, there are special instructions specific to this build environment.
Visual C++ 2008 Express Edition has several limitations not found in either Visual Studio 2008 Standard or Visual Studio 2010 Professional. Because of this, there are special instructions specific to this build environment.
To begin, make all of the same changes that you would make for Visual Studio 2008 Standard, except ignore anything relating to the x64 builds and build directories, as Visual C++ Express cannot compile x64 builds. Also note that you will get error about project folders not being supported in this version of the software every time you open the .sln file. This will not interfere with your compiling, just click OK to them all.
To begin, make all of the same changes that you would make for Visual Studio 2008 Standard, except ignore anything relating to the x64 builds and build directories, as Visual C++ Express cannot compile x64 builds. Also note that you will get error about project folders not being supported in this version of the software every time you open the .sln file. This will not interfere with your compiling, just click OK to them all.
In addition to the changes above, you will need to tell Visual C++ 2008 where to find the Microsoft Windows 2003 R2 Platform SDK we downloaded.
In addition to the changes above, you will need to tell Visual C++ 2008 where to find the Microsoft Windows 2003 R2 Platform SDK we downloaded.
To access the configuration that we need to change, we will need to open the Tools menu and select Options from it.


Expand "Projects and Solutions" from the left-hand side and then select "VC++ Directories". This will bring up the dialog that allows you to modify the search paths for your VC++ solutions.
#To access the configuration that we need to change, we will need to open the Tools menu and select Options from it.
#Expand "Projects and Solutions" from the left-hand side and then select "VC++ Directories". This will bring up the dialog that allows you to modify the search paths for your VC++ solutions.
  1
  1
Under the Win32 Platform, you need to add the following to Include files:
 
   $(ProgramFiles)\Microsoft Platform SDK for Windows Server 2003 R2\include\atl
#Under the Win32 Platform, you need to add the following to Include files:
   $(ProgramFiles)\Microsoft Platform SDK for Windows Server 2003 R2\include\mfc
   <nowiki>$(ProgramFiles)\Microsoft Platform SDK for Windows Server 2003 R2\include\atl
   $(ProgramFiles)\Microsoft Platform SDK for Windows Server 2003 R2\include\mfc</nowiki>
Next up is to get around a limitation regarding the compiling 32-bit ATL / MFC solutions in the Express editions of VS.
Next up is to get around a limitation regarding the compiling 32-bit ATL / MFC solutions in the Express editions of VS.
Open the file C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\include\atl\atlbase.h in a text editor and search for the following text:
Open the file C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\include\atl\atlbase.h in a text editor and search for the following text:
ninja
782

edits

Navigation menu