 ;;
 (defun aixigo-get-system-includes ()
   "Returns the default C++ system search paths, as returned by the system C pre-processor."
-  (with-temp-buffer
-    (eshell-command
-     "echo | gcc -x c++ -v -E /dev/null | egrep '^ .*include' | sed 's/^ //g'"
-     (current-buffer) 
-     )
-    (split-string (buffer-string) "\n" t)
+  (let (
+        (fname (buffer-file-name))
+        )
+    (with-temp-buffer
+      (setq default-directory (aixigo-get-current-project-path-base fname))
+      (shell-command
+       "echo | gcc -x c++ -v -E /dev/null | egrep '^ .*include' | sed 's/^ //g'"
+       (current-buffer) 
+       )
+      (split-string (buffer-string) "\n" t)
+      )
     )
   )
 

        (fname (buffer-file-name))
        )
    (with-temp-buffer
      (eshell-command
       (format "%s %s/build/include/external_modules -maxdepth 1 -mindepth 1 -type d | sort"
               aixigo-find-command
               (aixigo-get-local-file-part (aixigo-get-current-project-path-base fname))

  (let (
        (project-settings (aixigo-get-current-project-module-and-branch))
        )

    (setq aixigo-project-name (nth 0 project-settings))
    (setq aixigo-project-branch (nth 1 project-settings))
    
