I am trying to create a 'vector' For storing dynamic data values but despite text examples of how and when the 'vector' function can be used, it seems trying to use it within a DGK program results in compile errors. The important bits of code listed here.
#include <Dinput.h>
#include <algorithm>
#include <vector>
#include "DarkGDK.h"
using namespace std;
// the main entry point for the application is this function
////////////////////////////////////////////////////////////
void DarkGDK ( void )
{
// Set up initial variables
int i, e;
int P1, P2, P3, A, B;
float fCameraAngleX = 0.0f;
float fCameraAngleY = 0.0f;
// set up randomiser
dbRandomize ( dbTimer ( ) );
// initialise arrays.
vector<int> Dist;
---------------------
The compiler gives a list of LINK errors pertaining to the use of 'vector' at this point in this piece of code. As follows.
1>Linking...
1>libcpmtd.lib(xdebug.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>libcpmtd.lib(stdthrow.obj) : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@std@@YAXPB_W0I@Z)
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
------------------------------------------
What is causing these link errors and what can be done to enable the use of the 'vector' function within the program ?