It is actually fairly simple. You need to edit the compile/link properties.
Right click on the project (not the soluction itself) in the Solution Explorer and select Properties.
At the very top it allows you to select the Configuration. You will need to set both the Release and Debug configurations. The Release version is for the final product. The Debug version allows you to interactively debug your code. This can be very helpful at times.
These instructions will refer to whereever you have installed your AGK. Since it is possible to set that directory to something other than the default (which allows you to have multiple versions of AppGameKit installed at the same time), I will use '<AGK Dir>' to refer to that directory (mine is C:\TGC\V2_14). It is safer to use an absolute path rather than a relative one. That makes it possible to put your project directory anywhere. Whenever I install a new version of AppGameKit, the first thing I do is edit the Windows templates to use absolute paths for the AppGameKit version just installed. And I add all the changes listed below so that any project started from a template can be in a different location and be preconfigured.
To let your project 'see' the AppGameKit include files for the compilation stage, you want to change the 'Additional Include Directories' found in 'Configuration Properties->C/C++->General'. Add the following to the end of whatever string is in there:
<AGK Dir>\Tier2\common\include;<AGK Dir>\Tier2\common;%(AdditionalIncludeDirectories)
"%(AdditionalIncludeDirectories)" is the actual string intended above.
To let your project 'see' the TGC libraries for the linking stage, edit the 'Additional Library Directories' entry in 'Configuration Properties->Linker->General'. For the 'Release' configuration add:
<AGK Dir>\Tier2\Tier2\platform\windows\Lib\VS2013\Release;%(AdditionalLibraryDirectories)
For the 'Debug' configuration add:
<AGK Dir>\Tier2\Tier2\platform\windows\Lib\VS2013\Debug;%(AdditionalLibraryDirectories)
Some other configurations that I use for organization allow you to make sure that all the final and intermediate files created during compiling and linking to be created in directories underneath the project (instead of a shared area somewhere else) are set in the 'Configuration Properties->General' section. These need to be set for both the Release and Debug configurations (all the strings below are exactly as they appear, some of these fields may already appear as below):
Output Directory: $(ProjectDir)\Final\
Intermediate Directory: $(ProjectDir)\Inter\
Target Name: $(ProjectName)
Target Extension: .exe
Build Log File: $(IntDir)$(MSBuildProjectName).log
By specifying a different 'Intermediate Directory', you make sure that your executable directory doesn't get cluttered with things not needed for actual execution.
Manually add the 'Final' directory in your project directory' and create your 'media' directory in that. That media directory is where you put all your images and other data that your program will use when running.
Another setting that comes in handy is the 'Preprocessor Definitions' entry under 'Configuration Properties->C/C++->Preprocessor'. This is where you can set things that the project can use. I add 'AGKWINDOWS' as the first string. It allows me to use "#ifdef' in my code so that I can have one set of files for all platforms. This is how that can be useful:
#ifndef _H_APP
#define _H_APP
/////////////////////////////////////////
// CONSTANTS ////////////////////////////
/////////////////////////////////////////
#if defined(AGKWINDOWS) || defined(IDE_MAC)
#define DEVICE_WIDTH 960
#define DEVICE_HEIGHT 640
#define DEVICE_POS_X 32
#define DEVICE_POS_Y 32
#define FULLSCREEN false
#endif
// this is required by AGK for Mac and Windows
// but we will also use this ourselves
#define WINDOW_TITLE "Help YeeYee Get Home!"
// Link to AGK libraries
#include "agk.h"
// include our defined types
#include "ta_types.h"
// the std:: classes
#include <string>
/////////////////////////////////////////
// CLASS DEFINITION /////////////////////
/////////////////////////////////////////
class app
{
private:
TA_USHORT app_state; // state app is in
bool did_end; // flag for game has ended
std::string app_err_msg; // error message for error state
public:
// main vars
#ifdef IDE_MAC
unsigned int m_DeviceWidth;
unsigned int m_DeviceHeight;
#endif
public:
#if defined(IDE_ANDROID) || defined(AGKIOS) || defined(IDE_MAC)
// constructor
app() {}
// destructor
~app() {}
#else
// constructor
app() {memset ( this, 0, sizeof(app));}
#endif
// main app functions
void Begin( void );
void Loop( void );
void End( void );
private:
void closeThisApp(bool noforce=true);
void checkForExit();
void hadAnAppError(const char* errmsg);
void inBadState();
};
extern app App;
#endif
// Allow us to use the LoadImage function name
#ifdef LoadImage
#undef LoadImage
#endif
My current WIP (very lonely right now as I haven't had a lot of time) has 50 .h/.cpp files in the project. And, I was able to build for Windows, Mac, iOS and Android with the same files.
Cheers,
Ancient Lady