Compile ECWolf on Windows

From ECWolf Wiki
Revision as of 08:05, 7 January 2015 by Blzut3 (talk | contribs) (→‎Dependencies: Provide link to prebuilt development libraries for customized SDL_mixer.)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This guide will demonstrate how to compile the Mercurial version of ECWolf on Windows.

Dependencies

The following programs/libraries are used by ECWolf. The versions listed below are known to work, however other versions may work.

In addition to the above, the following are optional dependencies.

Mercurial is also needed to checkout a copy of the latest source. You will also need a compiler. MinGW and MSVC 2005 or later should work fine. The steps are more or less the same for both.

Retrieving the Source

Use Mercurial to retrieve the latest version of the source.

hg clone https://bitbucket.org/Blzut3/ecwolf

Compiling

First open the CMake GUI and put the location to the source code in the source code path. (Note that this is not the src directory in the repository but the root.) Then for the directory to build the binary in, create a build directory in the source code directory and use that. Once the two paths are entered click "Configure."

Here select the compiler you're going to generate the project for. Use MinGW Makefiles for MinGW or select the Visual Studio version if you are using that. Once you've made your selection, click "Finish."

At this point CMake will likely error because it can't find SDL. Find the SDL_INCLUDE_DIR and SDL_LIBRARY_TEMP and set them accordingly (SDL_LIBRARY_TEMP should point to SDL.lib for MSVC or SDL.dll for MinGW). Once you do that, clicking configure, and it will complain about SDL_mixer. Do basically the same thing only for SDLMIXER variables and click "Configure" again. It should succeed so click "Generate."

For MSVC you will now have a sln file which should build successfully. For MinGW open a command propmt and cd to the build directory and type mingw32-make. With MSVC you can statically link the standard library by adding /MT to CMAKE_CXX_FLAGS_RELEASE. MinGW can do the same by adding -static-libgcc.