This guide describes how you can use the Edacious SDK from an application built using Microsoft Visual Studio 2008. It also describes the procedure for compiling the Edacious library itself under Visual Studio. It assumes that you already have the Microsoft Windows SDK (or "Platform SDK") installed on your system.
Get the latest Edacious Windows binary package from the
download page.
You can unpack the archive to a location such as
C:\Program Files\Edacious.
Start Visual Studio and bring up Tools / Options.
Select Projects and Solutions / VC++ Directories.
In the Show directories for field, select the option
Include files. If you have unpacked the Edacious SDK package
into C:\Program Files\Edacious, for example, insert the line:
C:\Program Files\Edacious\include
Now select Show directories for / Library files and insert the line:
C:\Program Files\Edacious\lib
Edacious is built on top of the Agar
library. Precompiled binary packages of Agar are available from the
Agar download page and are
installed in the same way as Edacious.
See the Agar installation
instructions.
It is strongly recommended that you install a version of Agar compiled with
threads support.
You can now create your application. In the Application Wizard, set Application type to Console application, check the Empty project box and click Finish.
In the Solution Explorer, go to Properties from the
popup menu of your project.
Click on Configuration Properties / Linker / System and set
the SubSystem parameter to
Windows (/SUBSYSTEM:WINDOWS)
.
Click on Configuration Properties / Linker / Input, and add
the following to the Additional Dependencies field:
ag_eda.lib ag_gui.lib ag_core.lib SDL.lib SDLmain.lib opengl32.lib freetype.lib
If you are using the nofreetype flavor of the Agar SDK, remove the
freetype.lib
line.
Add a new C++ file to Source Files in the Solution Explorer, such as main.cpp. The application should now compile and run properly. See the ./demos directory of the Edacious source for some example applications.
Note: If you want your application to be portable to other operating systems and other development environments, consider the BSDBuild utility. It can even generate project files for you.
If you are not using the precompiled SDK and would like to compile Edacious
yourself, look for the project files included in the .\ProjectFiles\
directory in the Edacious source. Locate the .zip file matching your
Visual C++ release, for example vs2005-windows.zip will work with all
Visual C++ 2005 editions.
There are also some flavors such as nothreads, which disable thread
safety and nofreetype which does not depend on FreeType.
Unpack the archive into the very top Edacious source directory, such
that Edacious.sln will end up in the same directory as
Edacious's README
file.
Open Edacious.sln with Visual Studio and you should now be able to compile the toolkit. Once Edacious is compiled, run INSTALL-SDK.EXE in the root of the Edacious source directory to install the libraries on your system. By default, they are installed into C:\Program Files\Edacious.