Instructions for compilation on MS Windows with .NET / Visual C++
This document contains abbreviated instructions for compiling your own
GAUL libraries and executables with Microsoft Visual C++ and .NET. They
were tested with MS VC++ with .NET 1.x, but they should also work with
other similar setups.
Corresponding instructions for the Bloodshed Dev-C++ IDE are provided separately.
Compilation
PART 0: Download and unpack the Windows-specific version of the source code from the download page.
PART I: Create a WinGaul .NET solution as follows:
- Select File->New->Blank Solution
- Name it "WinGaul"
- click OK
PART II: Create gaul-util library.
- Create a "gaul-util" project to compile a static library:
- select the menu "File->New->Project",
- click the "Win32 Project" icon under Visual C++ Projects,
- type "gaul-util" in the "Name:" text box,
- select "Add to Solution"
- click the "OK" button.
- select "Application Setting"
i. select "Static library"
ii. uncheck "Precompiled header"
- click the "Finish" button.
- Add all C source files from the GAUL subdirectory "util" to the gaul-util project source files.
- Select File->Save All so that solution directory and subdirectory will be created.
- copy all the files and subdirectories from the GAUL subdirectory util/ to the gaul-util project folder
- select gaul-util/Source Files->Add->Add Existing Item and select all the source files
- select gaul-util/Header Files->Add->Add Existing Item and select all the header files
PART III: Create gaul-devel library.
- Create a "gaul-devel" project to compile a static library:
- select the menu "File->New->Project",
- click the "Win32 Project" icon under Visual C++ Projects,
- type "gaul-devel" in the "Name:" text box,
- Select "Add to Solution"
- click the "OK" button.
- select "Application Setting"
i. select "Static library"
ii. uncheck "Precompiled header"
- click the "Finish" button.
- Add all C source files from the GAUL subdirectory "src" to the gaul-devel project source files.
- Select File->Save All so as to create gaul-devel directory
- copy all the files and subdirectories from the GAUL subdirectory src/ to the gaul-devel project folder
- select gaul-devel/Source Files->Add->Add Existing Item and select all the source files
- select gaul-devel/Header Files->Add->Add Existing Item and select all the header files
- Add "../gaul-util" to Additional Include directories for gaul-devel project
- right click on gaul-util project-> Properties->C/C++ and enter ../gaul-util for Additional Include Directories
- Click OK
PART IV: example programs.
These instructions are for the "struggle" example,
but all examples are compiled in a similar way.
- Create a "Struggle" project to compile a console application:
- select the menu "File->New->Project",
- click the "Win32 Console Application" icon,
- type "Struggle" in the "Name:" text box,
- click the "OK" button.
- click the "Finish" button.
- Remove the Struggle.cpp and replace/Add the relevent C source files from the GAUL subdirectory "examples".
- Delete the Struggle.cpp from the project (right click on Struggle.cpp -> Remove)
- Copy the relevent C source file from the GAUL subdirectory "examples" to the location of Struggle.cpp
- select Struggle/Source Files->Add->Add Existing Item and select the source file copied
- Struggle->Set As StartUp Project
- Set Struggle project not to use precompiled headers:
- Right click on Stuggle Project->Properties->C/C++->Precompiled Headers
and change Create/Use Precompiled Header to "Not Using Precompiled Headers"
- Right click on Stuggle Project->Properties->C/C++->General->Additional Include Directories and enter ../gaul-devel; ../gaul-util
- Set Project Dependencies:
- Right Click Solution WinGaul -> Properties->Project Dependences
- Stuggle depends upon gaul-devel and gaul-util
- gaul-devel depends upon gaul-util
Compile the .NET solution.
|