【】跨平台数据库类 IBPP 出现putenv 没定义的有关问题

【求救】跨平台数据库类 IBPP 出现putenv 没定义的问题
本帖最后由 zhmx_love 于 2014-04-16 21:45:17 编辑
才学疏浅,自己找了几天不知道原因,特来向大家求助。

_ibpp类中


std::string SysPath(getenv("PATH"));
std::string::size_type pos = 0;
while (pos < mSearchPaths.size())
{
std::string::size_type newpos = mSearchPaths.find(';', pos);

std::string path;
if (newpos == std::string::npos) path = mSearchPaths.substr(pos);
else path = mSearchPaths.substr(pos, newpos-pos);

if (path.size() >= 1)
{
if (path[path.size()-1] != '\\') path += '\\';

AppPath.assign("PATH=");
AppPath.append(path).append(";").append(SysPath);
putenv(AppPath.c_str());

path.append("fbclient.dll");
mHandle = LoadLibrary(path.c_str());
if (mHandle != 0 || newpos == std::string::npos) break;
}
pos = newpos + 1;
}


提示 putenv函数未定义。。。我晕。好像是stdlib里面的东西,但是我包含了还是编译不过。

错误提示:

ibpp\_ibpp.cpp|148|error: 'putenv' was not declared in this scope|

环境用的是 codeblock+mingw+windows,求指点。
------解决方案--------------------
这个真不懂,mark 关注。。。。