VBDotNetProgrammer
Programmer
Hi all,
Im having trouble compiling an application which compiles fine under VC6 but not with GCC.
The error im getting is:
Xml.h:34: error: `static' can only be specified for objects and functions
make: *** [main.o] Error 1
The offending piece of code is:
class CXMLParser
{
public:
static bool GetXMLTagValues(string xmlFileString, string tagName, vector<string> *vect);
static string GetXMLTagValue(string xmlFileString, string tagName);
// Loads XML ruleset file into memory
static string LoadXMLFile(string xmlFilename);
static bool IsTagPresent(string xmlString, string tagName);
static string DeleteTagValue(string xmlString, string tagName);
static bool VerifyWellFormedness(string xmlToVerify);
};
Ive left some of the class def out but it is complaining about the last function def shown. Im i declaring static members incorrectly. VC6 doesnt mind but GCC doesnt seem to like it.
Any ideas?
Thanks
Im having trouble compiling an application which compiles fine under VC6 but not with GCC.
The error im getting is:
Xml.h:34: error: `static' can only be specified for objects and functions
make: *** [main.o] Error 1
The offending piece of code is:
class CXMLParser
{
public:
static bool GetXMLTagValues(string xmlFileString, string tagName, vector<string> *vect);
static string GetXMLTagValue(string xmlFileString, string tagName);
// Loads XML ruleset file into memory
static string LoadXMLFile(string xmlFilename);
static bool IsTagPresent(string xmlString, string tagName);
static string DeleteTagValue(string xmlString, string tagName);
static bool VerifyWellFormedness(string xmlToVerify);
};
Ive left some of the class def out but it is complaining about the last function def shown. Im i declaring static members incorrectly. VC6 doesnt mind but GCC doesnt seem to like it.
Any ideas?
Thanks