help on cgicc.dll build
"Hai Xu" <[email protected]> Sat, 19 Apr 2003 02:26:26 -0400
| Newsgroups | gmane.comp.gcc.cgicc.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
when I built cgicc.dll, I got two errors:
c:\temp\test\cgicc-3.2.1\cgicc\cgiinput.cpp(48) : error C2039: 'getenv' : is
not a member of 'std'
c:\temp\test\cgicc-3.2.1\cgicc\cgiinput.cpp(48) : error C2440:
'initializing' : cannot convert from 'class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >' to 'char *'
No user-defined-conversion operator available that can perform this
conversion, or the operator cannot be called
These two errors are related to
STDNS string
CGICCNS CgiInput::getenv(const char *varName)
{
char *var = STDNS getenv(varName);
return (var == 0) ? "" : var;
}
in CgiInput.cpp where char *var = STDNS getenv(varName); causes the errors.
After I changed it to
STDNS string var = getenv(varName);
and
return (var == 0) ? "" : var; to return var;
building is then successful with no error and warning.
Is this the right modification ?
however, the cgi samples using this dll don't work by returning
no proper header (actually nothing returned by cgi samples, and
dll crashed.
How should I handle that two errors correctly if the way I did is not right.
Thanks
Hai
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail