OpenXcom Forum

Contributions => Programming => Topic started by: Maszek on December 13, 2013, 03:27:24 pm

Title: Compiling... How do I do that?
Post by: Maszek on December 13, 2013, 03:27:24 pm
Sorry for creating yet another thread, any moderator is, of course, free to move/merge/delete this.

I know of the guide on compiling on the ufopaedia, but it isn't quite detailed enough for someone who never changed anything before.

All I did is change about two variables, and now when I try to compile I get errors in every single file, and even if it does compile it is 32 bit and loading takes eons.

So, could someone please give me a detailed guide on 1, how to get the very latest source code
2, how to set up folders and where the compiled executable will be
3, how to actually compile it for 64-bit systems
Title: Re: Compiling... How do I do that?
Post by: Warboy1982 on December 13, 2013, 04:52:26 pm
what operating environment are you compiling in/for?
Title: Re: Compiling... How do I do that?
Post by: Maszek on December 15, 2013, 03:31:49 pm
I am using Windows 7 64-bit and trying to compile for that, but failing pretty hard.
Title: Re: Compiling... How do I do that?
Post by: Warboy1982 on December 15, 2013, 06:46:37 pm
download and install visual studio 2010 express.
click on the github logo on the front page (the octocat) and click "download as zip" on the right hand side.
grab the pre-compiled dependency package (linked on the wiki).
grab this afxres.h (https://dl.dropboxusercontent.com/u/47596892/afxres.rar)

extract the zip from github, and extract the dependencies to the same folder.
extract the afxres.h file to C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include

open the .sln file.

to the right of the green "compile" button are the compiler settings. change "Debug" to "Release" and select "Win32", not "x64".

64 bit is in no way faster than 32 bit, this is a common misconception. the difference in speed you are experiencing is most likely caused by building a debug executable instead of release.

the express version of visual studio doesn't include a 64 bit compiler, but if you absolutely have your heart set on it, you can download and install the windows 7 SDK (https://msdn.microsoft.com/en-us/windowsserver/bb980924.aspx) which DOES.
Title: Re: Compiling... How do I do that?
Post by: Maszek on December 16, 2013, 03:35:53 pm
Thanks, you are my hero :D

Edit: I have copied the resulting executable and .dll files to my OpenXcom folder, and upon launching, was treated to this error: https://puu.sh/5OuPx.jpg

Pretty sure I haven't touched yaml-cpp.

Edit2: Disregard, my ruleset file was formatted badly.