Fix compilation and execution with msvc

This commit is contained in:
Christophe Dumez
2010-06-06 09:55:02 +00:00
parent 31165675b8
commit e8931c5747
6 changed files with 67 additions and 55 deletions

View File

@@ -283,7 +283,11 @@ int main(int argc, char *argv[]){
}
#endif
// Set environment variable
#if defined(Q_WS_WIN) && !defined(MINGW)
if(SetEnvironmentVariableA("QBITTORRENT", VERSION)) {
#else
if(putenv((char*)"QBITTORRENT="VERSION)) {
#endif
std::cerr << "Couldn't set environment variable...\n";
}