PDA

View Full Version : Getting error while compiling C++ code with sourcepro (gcc 4.4.6)



nagarjun
03-27-2013, 03:53 AM
#ifndef UtlPrivateProfile_h
#define UtlPrivateProfile_h 1

#include <rw/cstring.h>
#include <rw/tphdict.h>

class UtlExport UtlPrivateProfile
{
public:
UtlPrivateProfile( const char * pszIniFileName = NULL );
~UtlPrivateProfile();

long GetInteger( const char* pszSection,
const char* pszKey,
long lDefaultValue = 0 );

RWCString GetString( const char* pszSection,
const char* pszKey,
const char* pszDefault = "" );

RWBoolean GetString( const char* pszSection,
const char* pszKey,
char *szBuffer ); // for lame Windows...TD

unsigned GetSection( const char* pszSection,
RWCString &strBuffer );

RWTPtrHashDictionary<RWCString,RWCString RWDefHArgs(RWCString)>* GetSection( const char* pszSection );

private:
const char * pszIniFile;
RWTPtrHashDictionary<RWCString,RWCString RWDefHArgs(RWCString)>*
sectionMap;
};


#endif /* UtlPrivateProfile_h */

I'm using the above .h file in some cpp file, while compiling the code with gcc I'm getting the following errors.

UtlPrivateProfile.h:131: error: ISO C++ forbids declaration of ‚RWTPtrHashDictionary‚ with no type
UtlPrivateProfile.h:131: error: expected ‚;‚ before ‚<‚ token
UtlPrivateProfile.h:135: error: ISO C++ forbids declaration of ‚RWTPtrHashDictionary‚ with no type
UtlPrivateProfile.h:135: error: expected ‚;‚ before ‚<‚ token


same thing was compiled on solaris. But, it is giving problem in Linux. Any suggestions ?

nagarjun
03-27-2013, 05:41 AM
This problem is solved now.

accidentally I copied some old version of Roguewave files. After removing them this problem is solved.