Description
At the moment ths small command does absolutly nothing but the nothingness wont work. When i call the function SaveAll(); its supposed to just open a file, nothing more, but it doesnt. Ok here is the code
XMLFunctions.cpp
Code: Select all
#pragma hdrstop
#include "XMLFunctions.h"
#include "Main.h"
#pragma package(smart_init)
void SaveAll()
{
XMLDoc->FileName = "Settings.xml";
}
XMLFunctions.h
Code: Select all
//---------------------------------------------------------------------------
#ifndef XMLFunctionsH
#define XMLFunctionsH
#include <msxmldom.hpp>
#include <XMLDoc.hpp>
#include <xmldom.hpp>
#include <XMLIntf.hpp>
extern TXMLDocument *XMLDoc;
extern void SaveAll();
//---------------------------------------------------------------------------
#endif
Just as that it compiles and the program works, but as soon as i assign tha function to an event I get a compiler error.
event such as
Code: Select all
void __fastcall TMainForm::SaveSettingsClick(TObject *Sender)
{
SaveAll(); // This dont fucking work!!!
}
i get this error compiling
[Linker Error] Unresolved external '_XMLDoc' referenced from F:\DCNET\HUBSERVER\V1.0.6\SOURCE\XMLFUNCTIONS.OBJ
any ideas? im all clueless
PS :: first time i have used this board so sorry if i have started this thread in teh wrong place