I compiled my c++ program using libpqxx on my development machine. but in deployment machine i got this error: error: ‘row’ in namespace ‘pqxx’ does not name a type i installed same version libpqxx on deployment machine.
boost::property_tree::ptree UserModel::GetUsersJson(int page, std::string query){
pqxx::result R = GetUsers(page, query);
int count = R.size();
int pageCount = count / OFFSET_COUNT;
boost::property_tree::ptree users_node;
boost::property_tree::ptree user_node;
for(pqxx::row r : R)
{
user_node.put("id", r[0]);
user_node.put("email", r[1]);
user_node.put("password", r[2]);
user_node.put("details", r[3]);
user_node.put("created_at", r[4]);
users_node.push_back(std::make_pair(r[0].c_str(), user_node));
}
return users_node;
}
Aucun commentaire:
Enregistrer un commentaire