You can certainly use the Visual Studio ToolKit (availible at
http://www.microsoft.com/downloads/thankyou.aspx?familyId=272BE09D-40BB-49FD-9CB0-4BFA122FA91B&displayLang=en). However, you will also need to download the Platform SDK (availiable at
http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en).
Neither of these are small, so be prepared for a big download.
Now, we get to the important stuff... Assuming that you have installed (and updated) DarkSDK, you will need the folllowing batch code (ie copy and paste the text below and put it in a .BAT file) :
---------------------------------------------------------------------
SET INCLUDE=C:Program FilesMicrosoft Visual C++ Toolkit 2003include;C:Program FilesThe Game CreatorsDark Game SDK - FREEWARE EditionInclude;C:Program FilesMicrosoft Visual Studio .NET 2003Vc7PlatformSDKInclude;C:Program FilesMicrosoft DirectX 9.0 SDK (June 2005)Include
SET LIB=C:Program FilesMicrosoft Visual Studio .NET 2003Vc7PlatformSDKLib;C:Program FilesMicrosoft Visual C++ Toolkit 2003lib;C:Program FilesMicrosoft DirectX 9.0 SDK (June 2005)Libx86;C:Program FilesThe Game CreatorsDark Game SDK - FREEWARE EditionLibVS7;C:Program FilesMicrosoft Visual Studio .NET 2003Vc7atlmfclib
cl /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /c /D "_MBCS" /FD /EHsc /GX /ML /GS /ML /Fo"Release" TestSDK.cpp
link /subsystem:WINDOWS /machine:X86 /OUT:"TestSDK.EXE" Release.obj
---------------------------------------------------------------------
I will be including my batch file.
You can only compile programs after you have clicked on the Microsoft Visual C++ Toolkit Command Prompt.
Once at the command prompt, just type in the name of your batch file, and it should compile and link. At the moment, the commands for optimisation haven't been included - you can add those later.
In your code you may need the following lines,
before you #include "DarkSDK.h" :
#define INITGUID
#include <dxdiag.h>
Now, the details :
SET INCLUDE details the location of all the include files you will be needing - using absolute paths in your program isn't enough. The basic order detailed should be kept. You will need to replace my PlatformSDK path with yours.
SET LIB details the location of all the library files to be used. Again, keep the order I have given.
CL compiles the source code. I have kept it simple and only detailed one source file. The object file is current Release. Run CL /? at the command progam to see all availiable options.
LINK links the object file to create the executable. The options tell the link to compile to a 32-bit Intel compatiable Windows executable.
In your code you may need the following lines,
before you #include "DarkSDK.h" :
#define INITGUID
#include <dxdiag.h>
The total output should be something like :
C:>testcompile
C:>set INCLUDE=C:Program FilesMicrosoft Visual C++ Toolkit 2003include;C:Pr
ogram FilesThe Game CreatorsDark Game SDK - FREEWARE EditionInclude;C:Progra
m FilesMicrosoft Visual Studio .NET 2003Vc7PlatformSDKInclude;C:Program Fil
esMicrosoft DirectX 9.0 SDK (June 2005)Include
C:>set LIB=C:Program FilesMicrosoft Visual Studio .NET 2003Vc7PlatformSDKL
ib;C:Program FilesMicrosoft Visual C++ Toolkit 2003lib;C:Program FilesMicro
soft DirectX 9.0 SDK (June 2005)Libx86;C:Program FilesThe Game CreatorsDark
Game SDK - FREEWARE EditionLibVS7;C:Program FilesMicrosoft Visual Studio .N
ET 2003Vc7atlmfclib
C:>cl /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /c /D "_MBCS" /FD /EHsc /GX /ML
/GS /ML /Fo"Release" TestSDK.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
TestSDK.cpp
C:>link /subsystem:WINDOWS /machine:X86 /OUT:"TestSDK.EXE" Release.obj
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
LINK : warning LNK4089: all references to 'ADVAPI32.dll' discarded by /OPT:REF
LINK : warning LNK4089: all references to 'DPLAYX.dll' discarded by /OPT:REF
LINK : warning LNK4089: all references to 'OLEAUT32.dll' discarded by /OPT:REF
LINK : warning LNK4089: all references to 'SHELL32.dll' discarded by /OPT:REF
LINK : warning LNK4089: all references to 'WININET.dll' discarded by /OPT:REF