From e5dc30f238d248093ae65a45bf76412479ef754f Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Sat, 31 Mar 2012 13:03:03 -0400 Subject: [PATCH] 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. --- lisp/ob-C.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ob-C.el b/lisp/ob-C.el index 4f33fc453..5f6c1cb1d 100644 --- a/lisp/ob-C.el +++ b/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))