Difference between revisions of "Compiling with Microsoft Visual C++ (OpenXcom)"
(→FAQ) |
|||
Line 33: | Line 33: | ||
# Pick '''All Configurations''', go to '''Debugging''' and replace the '''Working Directory''' with '''..\bin'''. |
# Pick '''All Configurations''', go to '''Debugging''' and replace the '''Working Directory''' with '''..\bin'''. |
||
# Compile and run the project by pressing the '''Start Debugging''' button with a green arrow on the top toolbar. |
# Compile and run the project by pressing the '''Start Debugging''' button with a green arrow on the top toolbar. |
||
+ | # See the [http://msdn.microsoft.com/library/dd831853.aspx Visual Studio Documentation] for more information on the IDE. |
||
== FAQ == |
== FAQ == |
||
− | '''Q: I get a Failed To Load Palette error.''' |
+ | '''Q: I get a Failed To Load Palette error.'''<br> |
A: Copy the X-Com resources to your '''bin''' folder, see [[Installing (OpenXcom)|Installing]] for more details. |
A: Copy the X-Com resources to your '''bin''' folder, see [[Installing (OpenXcom)|Installing]] for more details. |
||
− | '''Q: I get an error about afxres.h not being found.''' |
+ | '''Q: I get an error about afxres.h not being found.'''<br> |
A: You're using a Visual C++ Express Edition which doesn't support Resource files, just remove '''resource.h''' and '''OpenXcom.rc''' from the project. |
A: You're using a Visual C++ Express Edition which doesn't support Resource files, just remove '''resource.h''' and '''OpenXcom.rc''' from the project. |
||
− | '''Q: I get an error about MSVCR100.DLL not being found.''' |
+ | '''Q: I get an error about MSVCR100.DLL not being found.'''<br> |
A: You're using the pre-built dependencies with an old Visual C++ version so you need to install the [http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5555 VC++ 2010 Redist]. |
A: You're using the pre-built dependencies with an old Visual C++ version so you need to install the [http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5555 VC++ 2010 Redist]. |
||
Revision as of 16:40, 9 November 2011
Getting the source
You will need a Windows Git client to grab the latest source code.
TortoiseGit
- Install Git for Windows. When asked, select Use Git Bash only, Use OpenSSH and Checkout Windows-style, commit Unix-style line endings.
- Install TortoiseGit. Restart the computer if asked.
- Configure TortoiseGit by right-clicking any folder and selecting TortoiseGit > Settings. Select Git > Config, fill out your Username and E-mail as will be displayed in your commits, and make sure AutoCrlf and SafeCrlf are checked.
- Go to the folder where you wanna put the code, right-click on it and select Git Clone.
- Fill out the Url to the repository (the official one or your own fork), check the Directory is correct and press OK. Better get a drink, it's gonna be a while.
- In the future, you can stay up to date by right-clicking your folder and selecting Git Sync to Pull the latest code.
Git Extensions
- Install Git Extensions for your system.
- TODO
Installing dependencies
Put the required library files in a deps folder inside the codebase folder with the following structure:
- deps\include\SDL - SDL headers
- deps\include\yaml-cpp - yaml-cpp headers
- deps\lib - library DLL and LIB files
Alternatively, you can grab the pre-compiled dependencies with all the files already in place, and extract it to your codebase folder.
Compiling and running
- Install Microsoft Visual C++ (part of Visual Studio). If you don't have it, you can get VC++ 2010 Express Edition for free.
- Go to the src subfolder inside your codebase folder and open OpenXcom.2010.sln if you have VC++ 2010 or OpenXcom.2008.sln if you have VC++ 2008. You might get issues using older versions, but you can try just editing the version number in OpenXcom.2008.sln and OpenXcom.2008.vcproj to match.
- Right-click the OpenXcom project file and select Properties.
- Pick All Configurations, go to Debugging and replace the Working Directory with ..\bin.
- Compile and run the project by pressing the Start Debugging button with a green arrow on the top toolbar.
- See the Visual Studio Documentation for more information on the IDE.
FAQ
Q: I get a Failed To Load Palette error.
A: Copy the X-Com resources to your bin folder, see Installing for more details.
Q: I get an error about afxres.h not being found.
A: You're using a Visual C++ Express Edition which doesn't support Resource files, just remove resource.h and OpenXcom.rc from the project.
Q: I get an error about MSVCR100.DLL not being found.
A: You're using the pre-built dependencies with an old Visual C++ version so you need to install the VC++ 2010 Redist.