7
$\begingroup$

I used to be able to compile to C without problems, but from one day to the next, when I try to compile something, e.g.

Compile[{{x,_Real}},x^2,CompilationTarget->"C"]

I get the message

Compile::nogen: A library could not be generated from the compiled function.

I searched for the error message but can't find out what's going on.

$\endgroup$
8
  • $\begingroup$ Do you always get the Compile::nogen error? Or only some of the time? $\endgroup$ Sep 23, 2014 at 15:39
  • $\begingroup$ Since a few days always, before I never got it. $\endgroup$
    – Jansen
    Sep 23, 2014 at 15:40
  • $\begingroup$ Works for me with 10.0.1 on Mac OSX. Did you recently update? What's your platform? $\endgroup$ Sep 23, 2014 at 15:41
  • $\begingroup$ I have mathematica 10.0 and also on Mac OSX. I didn't manually update anything, don't know about auto updates though. $\endgroup$
    – Jansen
    Sep 23, 2014 at 15:44
  • 1
    $\begingroup$ If you're a mac user, there was a patch for XCODE and 10.9.5 last week I think which meant I had to run the XCODE installer again on SystemModeler to bring that back to life with compiling.... wonder if it's the same issue? Try running XCODE, then rerunning in Mathematica maybe? $\endgroup$ Sep 23, 2014 at 16:49

1 Answer 1

9
$\begingroup$

Following the 10.9.5 patch to MacOS and the corresponding update to XCODE it may be necessary to run XCODE again to reinstall it and then this should renable C compilation in Mathematica (v10) and SystemModeler (v3).

Certainly was the case for me.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.