From Sourceforge:
Trouble in Libreland is a 2D real-time strategy game that will be written in C++ using Gorgon Game Engine. The project is initiated in order to compete in Liberated Pixel Cup. The game will take a place in a town called Libreland which is being attacked by wildlings. The aim of the game is to protect the town from wildlings by training soldiers and artisans; upgrading them with the taxes paid by citizens.
Getting Visual Studio 2010 (VS) to properly compile a game from source is probably the biggest challenge I have had in this class to date. After wrestling with the compiler for several hours I was finally able to succeed in getting the application to build and run within VS and that was a very rewarding experience. The game that I chose is titled Trouble in Libreland and is an RTS/RPG hybrid the game gives you a town of villages that you need to upgrade in order to stave off attacking enemies called “wildlings”. The game is written primarily in C++ (over 50%) and partially in C, so I was able to find a .sln or solution file in the trunk of the repository for the game source code.
Getting the Source
In order to retrieve the source from the Sourceforge SVN repository I downloaded a useful application called Tortoise SVN, which I highly recommend as it is easy to use. Tortoise runs straight from the shell so all you have to do to grab a repo is right click within an explorer window select SVN Checkout from the dropdown and enter the URL of the repository in my case that was: ‘svn://svn.code.sf.net/p/trinlibr/code/trunk’. The source will then download to a directory called /code which you can place anywhere you want, mine is in My Documents.
After downloading the source navigate to /Project and click on ‘Trouble in Libreland.sln’ this will open the solution project in Visual Studio. Under the solution dropdown there are three sub-trees; GGE, Gorgon and Trouble in Libreland. Now next to the green play arrow in the toolbar up top change ‘Debug’ to ‘Release’ and click the green arrow. When I did this the first time I got the following warnings in a popup window:
GGE Win32 is out of date
Gorgon Win32 is out of date
Trouble in Libreland Win32 is out of date
this is fixable by right-clicking on the appropriate sub-trees and rebuilding each of them. Lets start debugging for release again:
waiting…
Error:
fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt after installing VS2012 release preview
Ok this isn’t so obvious to fix and was actually the primary reason I couldn’t get past the debug for release in many other games, lets see what google brings up for this error:
http://stackoverflow.com/questions/10888391/link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-invalid-or-c
In this stack overflow question the answer tells us that we need to install Microsoft Visual Studio 2010 Professional SP1, this takes a while so make a grilled cheese, brew some tea and come back later. Ok it should work now, right? right!? Lets see, debug for release again:
Warning Openal32.dll is missing
Ok this is simply downloading a missing library which can be found here:
**Note: This is a direct download**
http://connect.creativelabs.com/openal/Downloads/oalinst.zip
Alright one last debug annnnnnd, success! The game will now run successfully
Links:
http://sourceforge.net/projects/trinlibr/
http://stackoverflow.com/questions/10888391/link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-invalid-or-c
http://www.microsoft.com/en-hk/download/confirmation.aspx?id=23691
http://msdn.microsoft.com/en-us/library/y549e41e.aspx