emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Stanton <stanton@haas.berkeley.edu>
To: Eric Schulte <eric.schulte@gmx.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Problems running C code in org-mode under Windows
Date: Wed, 28 Mar 2012 00:14:03 -0700	[thread overview]
Message-ID: <40C7B1BFC291ED4E9D10436D07736A334702EB99A6@EXMAIL7.haas.uc.berkeley.edu> (raw)
In-Reply-To: <87r4wec9lg.fsf@gmx.com>

> > As far as I can see, at this point the command being called is
> >
> > C:/emacs/emacs-24.0.94/bin/cmdproxy -c "gcc -o \"c:/users/stanton[...]C-
> bin-10700opx\" \"c:/users/Stanton[...]C-src-10700bfr.c\""
> >
> > (where [...] just means I deleted some more path information, but it's all
> valid).
> >
> > If I execute this exact command at the command line, the compilation
> > works fine, and creates an executable file C-bin-10700opx.exe (note
> > that gcc on Windows automatically adds the .exe extension if you omit
> > it). However, after running the call-process-region command in the .el
> > file, no executable file is produced, and error-file has the contents
> >
> > Access is denied

In case anyone is interested, this explains why the Access Denied errors occurred, and why switching to bash solved the problem:


Another solution to the Access Denied problem is to put the following line in init.el:

(setq org-babel-C-compiler "gcc-4")

Then you can keep using the Window shell instead of bash. However, this still only solves part of the problem. The output is still blank.

      parent reply	other threads:[~2012-03-28  7:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 23:04 Problems running C code in org-mode under Windows Richard Stanton
2012-03-27  1:44 ` Eric Schulte
2012-03-27 17:25   ` Richard Stanton
2012-03-27 16:06     ` Eric Schulte
2012-03-27 20:43       ` Richard Stanton
     [not found]       ` <0B0951AC10878A45A228603F57EEA0CE46F5DD0CBF@EXMAIL7.haas.uc.berkeley.edu>
2012-03-28  6:00         ` Richard Stanton
2012-03-28  7:14       ` Richard Stanton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40C7B1BFC291ED4E9D10436D07736A334702EB99A6@EXMAIL7.haas.uc.berkeley.edu \
    --to=stanton@haas.berkeley.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric.schulte@gmx.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).