Compiling with Microsoft Visual C++ (OpenXcom)
Revision as of 14:51, 6 April 2024 by Yarolig (talk | contribs) (→unresolved external symbol " YAML ")
Libraries
- SDL: https://libsdl.org/release/SDL-devel-1.2.15-VC.zip
- SDL_mixer: https://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-devel-1.2.12-VC.zip
- SDL_image: https://www.libsdl.org/projects/SDL_image/release/SDL_image-devel-1.2.12-VC.zip
Setting up
- Download GitHub for Windows.
- Download the source code from here, by pushing Clone in Desktop.
- Download and install X-COM: UFO Defense.
- Navigate to <path-to-game>\XCOM\ and copy the following folders.
GEODATA GEOGRAPH ROUTES MAPS SOUND TERRAIN UFOGRAPH UFOINTRO UNITS
5. Navigate to <path-to-repo>\OpenXcom\bin\UFO and paste the folders in there.
Compiling (x32 Release)
- Download and install Visual Studio. A free version is available here.
- Download the following dependencies for the appropriate version of Visual Studio:
- Extract the archive's contents to <path-to-repo>\OpenXcom\
- Navigate to <path-to-repo>\OpenXcom\src and open OpenXcom.2010.sln.
- Compile the project by right clicking on OpenXcom and selecting Build. Upgrading the project may be needed on newer versions of Visual Studio.
- Navigate to <path-to-repo>\OpenXcom\bin then copy all the DLLs from <path-to-repo>\OpenXcom\bin\Win32 to <path-to-repo>\OpenXcom\bin\Win32\Release
- Move the common, UFO and standard folders from <path-to-repo>\OpenXcom\bin to <path-to-repo>\OpenXcom\bin\Win32\Release
- Certain anti-viruses such as Avast may stop the project from building. Add the OpenXcom folder as an expection.
- See the Visual Studio Documentation for more information on the IDE.
Issues fixed
Failed To Load Palette
Copy the X-Com resources to your bin folder, see Installing for more details.
afxres.h not found
Remove resource.h and OpenXcom.rc from the project.
MSVCR100.DLL not found
Install these files.
Platform 'x64' cannot be found
Compile as Win32.
unresolved external symbol "<blah-blah-blah> YAML <blah>"
Try adding YAML_CPP_DLL
define to the project properties
linker errors
2>CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409
2>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
Right-click in Solution Explorer on the openxcom project, click Properties. Linker -> Manifest File -> Generate Manifest = No (/MANIFEST:NO)