I'm trying to compile licq on Solaris build 24 x86 using sunstudio 11
c code compiles succesfully,but there are several problems with c++ code
For example,if we have a code like this
int n=5;
...
char ch[n];
then CC produces error: An integer constant expression is required within the
array subscript operator.
This can be solved by changing char ch[n]; to char *ch=(char *)malloc(n);
But there is another problem
in file user.cpp
line 3624: m_fConf.ReadNum("SSTime", m_nSSTime, 0L);
"user.cpp", line 3624: Error: Could not find a match for
CIniFile::ReadNum(const char[7], long, long) needed in ICQOwner::ICQOwner().
Here is some class in licq_file.h:
bool ReadNum(const char *_szKey, unsigned long &data, const unsigned long
_nDefault = 0);
bool ReadNum(const char *_szKey, unsigned short &data, const unsigned short
_nDefault = 0);
bool ReadNum(const char *_szKey, signed short &data, const signed short
_nDefault = 0);
bool ReadNum(const char *_szKey, char &data, const char _nDefault = 0);
I tried g++ for this file and it's ok
So my question is what flag should I use to disable error with arrays and what
kind of problem is with these functions?
Now I'm looking through docs.sun.com and manual pages but can't find the answers
P.S sorry if I posted this topic in a wrong forum
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
https://opensolaris.org:444/mailman/listinfo/opensolaris-code