Author Topic: I'm terrible at this, please help me compile OpenXCom  (Read 5609 times)

Offline Istrebitel

  • Sergeant
  • **
  • Posts: 46
    • View Profile
I'm terrible at this, please help me compile OpenXCom
« on: June 25, 2014, 09:40:41 pm »
Well, title says it all. I'm a C# programmer (done a lot of C/C++ stuff in the past) and I consider myself quite advanced with PCs, but I just don't get this.

So, I want to compile OpenXCom for myself since I want to add some debug output to debug air combat (https://openxcom.org/bugs/openxcom/issues/717). I downloaded the code from git. I have VS2010 installed, so I open the sln file. I compile and it fails - needs yaml's header. Okay, I'm looking at the readme and it says I need five libs:

- SDL (libsdl1.2):
https://www.libsdl.org
- SDL_mixer (libsdl-mixer1.2):
https://www.libsdl.org/projects/SDL_mixer/
- SDL_gfx (libsdl-gfx1.2), version 2.0.22 or later:
https://www.ferzkopp.net/joomla/content/view/19/14/
- SDL_image (libsdl-image1.2):
https://www.libsdl.org/projects/SDL_image/
- yaml-cpp, version 0.5.1 or later:
https://code.google.com/p/yaml-cpp/


Okay, I start with yaml-cpp. I download it - it's a folder with folders inside. Where do I put them? How do I tell VS2010 where to look for them? Okay, I guess I go into project properties and add an include path to the folder that contains the folder that contains yaml's header. But now it complains about some "boost/shared_ptr.hpp"... what is an hpp anyway? I only remember there being "h" files and "cpp" or "c" files! Anyway, I look at the yaml's google code page and readme and it doesn't tell me I need any other library to use yaml... I google and it seems I do need this "boost" so I download it... another folder, with another bunch of folders... do I add it again to the "include" paths? But then I'm looking at SDL site, and no download option offers "libsdl1.2"... or does it mean I need to get source codes?....

You see, I'm kinda getting nowhere here... and I don't even know where to read about this. It seems it's so trivial to other people since nowhere it explains how to do it! And I don't even know how to google for this, because... well, I don't know what to ask for!

Can anyone who has already done this please tell me how am I supposed to do it properly?

Thanks in advance!

Offline AndO3131

  • Colonel
  • ****
  • Posts: 137
    • View Profile
« Last Edit: June 25, 2014, 10:34:52 pm by AndO3131 »

Offline Yankes

  • Commander
  • *****
  • Posts: 2334
    • View Profile
Re: I'm terrible at this, please help me compile OpenXCom
« Reply #2 on: June 25, 2014, 10:28:19 pm »
hpp is C++ header, it could be hxx too if you use different compiler (this is why std dont have extension at all).

Offline Istrebitel

  • Sergeant
  • **
  • Posts: 46
    • View Profile
Re: I'm terrible at this, please help me compile OpenXCom
« Reply #3 on: June 25, 2014, 10:47:48 pm »
Many thanks for the link, AndO3131!

However, was I supposed to guess that (I mean, for example, that dependencies go in the "deps" folder)? I mean, there is no such folder initially, and readme does not say that you have to put dependencies in that folder...
« Last Edit: June 26, 2014, 12:12:16 am by Istrebitel »

Offline Istrebitel

  • Sergeant
  • **
  • Posts: 46
    • View Profile
Re: I'm terrible at this, please help me compile OpenXCom
« Reply #4 on: June 26, 2014, 12:53:04 am »
RRrright, got it to compile, and found a really big bug (basically, missile weapons almost can't miss because if they miss, they try to hit again and again several times in a row before finally giving up)

Offline KingMob4313

  • Commander
  • *****
  • Posts: 537
  • Never let me down again.
    • View Profile
    • Mod Hub for Equal Terms 2.0
Re: I'm terrible at this, please help me compile OpenXCom
« Reply #5 on: June 26, 2014, 04:02:49 am »
Wow, timely thread.

Thanks for the help everyone. I just gotta clear an issue with 'Error   247   error RC1015: cannot open include file 'afxres.h'.' and I'll be compiling. I just need to get the foundation classes.
'

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2336
  • Developer
    • View Profile

Offline KingMob4313

  • Commander
  • *****
  • Posts: 537
  • Never let me down again.
    • View Profile
    • Mod Hub for Equal Terms 2.0
Re: I'm terrible at this, please help me compile OpenXCom
« Reply #7 on: June 26, 2014, 04:57:21 am »
Warboy1982, you are a ninja.

Thank you.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2151
    • View Profile
Re: I'm terrible at this, please help me compile OpenXCom
« Reply #8 on: June 29, 2014, 12:55:50 am »
If you're compiling the dependencies yourself, you gotta build Debug and Release versions of yaml-cpp separately (named "yaml-cppd.lib" and "yaml-cpp.lib" respectively).

Offline FudgeDragon

  • Captain
  • ***
  • Posts: 54
    • View Profile
Re: I'm terrible at this, please help me compile OpenXCom
« Reply #9 on: June 30, 2014, 11:13:36 am »
Following on from what SupSuper says, It also probably bears mentioning that depending on which version of yaml-cpp you've download you may need to change the names of the dependencies (in Properties->Configuration Properties->Linker->Input->Additional Dependencies) for your release and debug configurations.

In the new version of yaml-cpp the libraries are called libyaml-cppmd.lib (for release) and libyaml-cppmdd.lib (for debug)

Offline KingMob4313

  • Commander
  • *****
  • Posts: 537
  • Never let me down again.
    • View Profile
    • Mod Hub for Equal Terms 2.0
Re: I'm terrible at this, please help me compile OpenXCom
« Reply #10 on: July 06, 2014, 05:14:32 am »
If you're compiling the dependencies yourself, you gotta build Debug and Release versions of yaml-cpp separately (named "yaml-cppd.lib" and "yaml-cpp.lib" respectively).

Thanks for the big help today. I have a release now built on my machine and I'm arms deep in mechanics now.