PCSX2 Documentation/Compiling on Windows: Difference between revisions

Line 169: Line 169:


==Effective Build Troubleshooting Steps==
==Effective Build Troubleshooting Steps==
''This section is severely obsolete. Bringing it up to date requires extended research in order to rebuild it from scratch''
So, your build failed. What now? Even in the most perfect of circumstances, there is always the possibility that your build is going to fail for some reason or another. I've included a few things to try that should take care of almost all of the common compiling issues that users have.
 
If at first you don't succeed, retry the build, at least once. Visual Studio is notorious for spamming errors about files being in use, access denied, or errors returned from mt.exe. If this happens to you, or frankly in pretty much any other case, make sure to retry the build at least once to ensure you have a reproducible build failure!
 
It is good practice to clean your build environment of Visual Studio build-process temporary files and post-build remnants of the solution if you encounter errors while building. This is a quick and painless process. To begin, open the PCSX2_suite.sln Solution file. Once Visual Studio has opened, select the build of PCSX2 that you are having trouble building from the Build Target dropdown (e.g., SSE2, SSSE3, SSE4, etc.) Click on the Build menu and select Clean Solution from the list. Try to build again, and see if this solves your problem.


So, your build failed. What now? Even in the most perfect of circumstances, there is always the possibility that your build is going to fail for some reason or another. I've included a few things to try that should take care of almost all of the common compiling issues that users have.
When all else fails, the error log and output screens can be a wealth of information. Even if you're not a developer, you can look at the error log and extrapolate what files are involved in the error you're having. Once you know that, search for the files and see if any of them are in the directories that are supposed to be configured in the search paths -- if so, go verify in your VC++ Directories setting that you have properly entered the dependency directories. Mistyping the directory names, including the wrong directory, or overlooking a directory is one of the most common causes of build failure and can be easily and quickly fixed. If that doesn't work, post about your experiences on the PCSX2 forum under the relevant topic and someone should be able to help you out.
If at first you don't succeed...
Re-try the build, at least once. Visual Studio is notorious for spamming errors about files being in use, access denied, or errors returned from mt.exe. If this happens to you, or frankly in pretty much any other case, make sure to retry the build at least once to ensure you have a reproducible build failure!
CL.EXE Compiling Errors w/ Visual Studio 2008 Standard
If you are using Visual Studio 2008 Standard and have followed this guide from start to finish and are experiencing build errors in relation to CL.EXE, a workaround is to put the VS2008 install disc in and to modify your installation of VS and add Visual C#. Note that you're not installing C# because any of PCSX2 is programmed in C#, you're installing C# because for some reason, the C++ install doesn't put the necessary version of CL.EXE in your build environment. I'm investigating why this is and will update the guide if I find a better way to solve the missing CL.EXE problem. I had this problem in two specific cases but I've been shown instances where it was unnecessary. As such, I pulled it from the main steps and added it as a possible workaround in case anyone else encounters it. It seems to only occur when running under a Virtual PC in Virtual PC 2007.
Clean your Dev Environment
It is good practice to clean your build environment of Visual Studio build-process temporary files and post-build remnants of the solution if you encounter errors while building. This is a quick and painless process. To begin, open the pcsx2_suite_2008.sln Solution file. Once Visual Studio has opened, select the build of PCSX2 that you are having trouble building from the Build Target dropdown (e.g., SSE2, SSSE3, SSE4, etc.) Click on the Build menu and select Clean Solution from the list. Once this has completed, run clean_msvc.cmd in the main PCSX2 SVN directory. This will clean out more unneeded data that Visual Studio leaves behind in a clean. Retry the build and see if this solves your problem.
Re-download the Source
It is possible (though very uncommon) for such drastic changes to be made to the source tree in SVN that you may have stale code or remnants of previous SVN revisions that have ended up sitting in your SVN directory. A quick and non-destructive way to test this is to create a new build directory and re-checkout the source from the SVN repository. After a full fresh checkout, attempt the build again.
Read the Logs - Trace the Errors
When all else fails, the error log and output screens can be a wealth of information. Even if you're not a developer, you can look at the error log and extrapolate what files are involved in the error you're having. Once you know that, search for the files and see if any of them are in the directories that are supposed to be configured in the search paths -- if so, go verify in your VC++ Directories setting that you have properly entered the dependency directories. Mistyping the directory names, including the wrong directory, or overlooking a directory is one of the most common causes of build failure and can be easily and quickly fixed. If that doesn't work, post about your experiences on the PCSX2 forum under the revelant topic and someone should be able to help you out.


==Files Necessary from Build for PCSX2's Execution==
==Files Necessary from Build for PCSX2's Execution==
ninja
31

edits