Author Topic: A nubb compiles and runs it  (Read 3948 times)

Offline alienfood

  • Captain
  • ***
  • Posts: 79
  • It's people!
    • View Profile
A nubb compiles and runs it
« on: November 24, 2012, 04:21:41 pm »
This is not targeted at the Warboys of the world. I got stuck at various points following the instructions, I wanted to pass along some notes in case others get stuck at the same places.

1. Endless trouble with yaml-cpp. It needs a dll and a lib, if you just import into a new VS "project from existing code" I couldn't get it to make the lib even though the import lib switch was set. You are much better off using CMake as suggested by yaml, EXCEPT don't create a "build" subdir, just run

cmake -G "Visual Studio 9 2008" -DBUILD_SHARED_LIBS=ON

right inside the directory where you extracted. Then, if you still have runtime issues, do a Release (not Debug) build on yaml, I could not get the sucker to run as a Debug build.

2. When you finally have it running, you are likely to get yaml errors about various keys not found. For instance, I saw "inDogfight", "interceptionOrder etc keys not found. This is because you will have pulled down source code which does not always have matching elements in Xcom1Ruleset.rul. The specifics change rapidly, because development is proceeding, but basically you have to perform a source search for the offending key, it will be in a line that looks like this:

    node["inDogfight"] >> _inDogfight;

Look at that line, and nearby you will probably find similar lines. Now grep through the rul file, find examples of the similar lines, and paste in a new line to handle the missing node.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: A nubb compiles and runs it
« Reply #1 on: November 24, 2012, 05:11:09 pm »
not sure if offended or flattered.
thank you?

i found the guide at The Wiki incredibly helpful for setting up visual studio, especially the pre-compiled dependencies.
just dump em in place and off you go.
« Last Edit: November 24, 2012, 05:14:00 pm by Warboy1982 »

Offline alienfood

  • Captain
  • ***
  • Posts: 79
  • It's people!
    • View Profile
Re: A nubb compiles and runs it
« Reply #2 on: November 24, 2012, 08:03:23 pm »
I can't imagine why I didn't notice the precompiled dependencies link, that is a lot quicker than struggling with yaml or cmake.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: A nubb compiles and runs it
« Reply #3 on: November 25, 2012, 03:11:12 am »
For reference, you need to turn on an option in the VS project settings to build a DLL. I just use CMake anyways, much simpler. :P