diff --git a/src/axis_imu.cc b/src/axis_imu.cc
index c441513ecc3d302d375b2f6194ad5ece1e952839..24b015b177c3c8a2bad37e6dbbf121ea7fca21da 100644
--- a/src/axis_imu.cc
+++ b/src/axis_imu.cc
@@ -289,13 +289,13 @@ int main(int argc, char *argv[]) {
   curl = curl_easy_init();
 
   if (curl) {
-    curl_easy_setopt(curl, CURLOPT_URL, url);
+    curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
     /* example.com is redirected, so we tell libcurl to follow redirection */ 
     curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
     //    curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
     curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
     curl_easy_setopt(curl, CURLOPT_USERNAME, "root");
-    curl_easy_setopt(curl, CURLOPT_PASSWORD, root_passwd);
+    curl_easy_setopt(curl, CURLOPT_PASSWORD, root_passwd.c_str());
  
     /* Perform the request, res will get the return code */ 
     res = curl_easy_perform(curl);