OpenXcom Forum
Contributions => Programming => Topic started by: alienfood 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.
-
not sure if offended or flattered.
thank you?
i found the guide at The Wiki (https://www.ufopaedia.org/index.php?title=Compiling_with_Microsoft_Visual_C%2B%2B_(OpenXcom)) incredibly helpful for setting up visual studio, especially the pre-compiled dependencies (https://openxcom.org/download/misc/openxcom-deps-win-vc.zip).
just dump em in place and off you go.
-
I can't imagine why I didn't notice the precompiled dependencies link, that is a lot quicker than struggling with yaml or cmake.
-
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