diff src/main.cpp @ 458:60779173dddf

Win32 build updates; version is 1.0
author Chris Cannam
date Wed, 01 Apr 2015 12:59:34 +0100
parents ea7ca3335a1a
children 7665cc683dd1
line wrap: on
line diff
--- a/src/main.cpp	Tue Mar 31 18:16:09 2015 +0100
+++ b/src/main.cpp	Wed Apr 01 12:59:34 2015 +0100
@@ -39,6 +39,7 @@
 
 #include <iostream>
 #include <signal.h>
+#include <cstdlib>
 
 #include <vamp-hostsdk/PluginHostAdapter.h>
 
@@ -153,8 +154,11 @@
     QString newPath = tonyVampPath + sep + vampPath;
 
     cerr << "Setting VAMP_PATH to " << newPath << " for Tony plugins" << endl;
-    
-    setenv("VAMP_PATH", newPath.toLocal8Bit().data(), 1);
+
+    QString env = "VAMP_PATH=" + newPath;
+
+    // Windows lacks setenv, must use putenv (different arg convention)
+    putenv(strdup(env.toLocal8Bit().data()));
 }
         
 int