aliens

Author Topic: Compiling... How do I do that?  (Read 4950 times)

Offline Maszek

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Compiling... How do I do that?
« 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

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Compiling... How do I do that?
« Reply #1 on: December 13, 2013, 04:52:26 pm »
what operating environment are you compiling in/for?

Offline Maszek

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Re: Compiling... How do I do that?
« Reply #2 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.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Compiling... How do I do that?
« Reply #3 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

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 which DOES.
« Last Edit: December 15, 2013, 06:49:45 pm by Warboy1982 »

Offline Maszek

  • Squaddie
  • *
  • Posts: 8
    • View Profile
Re: Compiling... How do I do that?
« Reply #4 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.
« Last Edit: December 16, 2013, 04:30:21 pm by Maszek »