Browse Source

add .exe to the end of compiled C files on windows

  Thanks to Richard Stanton for pointing out this problem and
  suggesting the fix.

* lisp/ob-C.el (org-babel-C-execute): Add .exe to the end of compiled
  C files on windows.
Eric Schulte 13 years ago
parent
commit
da0e6fbde1
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/ob-C.el

+ 3 - 1
lisp/ob-C.el

@@ -88,7 +88,9 @@ or `org-babel-execute:C++'."
 			(cond
 			 ((equal org-babel-c-variant 'c) ".c")
 			 ((equal org-babel-c-variant 'cpp) ".cpp"))))
-         (tmp-bin-file (org-babel-temp-file "C-bin-"))
+         (tmp-bin-file (org-babel-temp-file
+			"C-bin-"
+			(if (equal system-type 'windows-nt) ".exe" "")))
          (cmdline (cdr (assoc :cmdline params)))
          (flags (cdr (assoc :flags params)))
          (full-body (org-babel-C-expand body params))