Matlab MEX is compatible just with GCC version 4.7.X, however OpenSUSE 13.1 comes with GCC 4.8.1, when I compile a Matlab MEX file a warning comes out: Warning: You are using gcc version '4.8.1'. The version of gcc is not supported. The version currently supported with MEX is '4.7.x'., and MEX compilation fails.

I saw this question in stackoverflow: Installing older version of gcc, but OpenSUSE does not provide a repository with GCC older versions. How can I install easily an older version of GCC just for Matlab? And, how can I setup Matlab to do it correctly?

I'm using Matlab 8.3 R2014a.

  • Visit the OpenSUSE GCC Repository – eyoung100 Sep 19 '14 at 14:28
  • @ECarterYoung I tried to install gcc47 from that repository but installation fails. – OSjerick Sep 19 '14 at 14:42
  • What is the failure, as mixing a binary based distro with source based packages is generally a bad idea? – eyoung100 Sep 19 '14 at 14:45
  • @ECarterYoung Yast just said No se han podido instalar los siguientes paquetes: gcc47, is in Spanish. – OSjerick Sep 19 '14 at 14:58
  • 1
    @OSjerick - sorry I wasn't suggesting to do that, just that you'd have to downgrade if you wanted to use that. But I agree, you generally do not want to drop and/or mess with your gcc installation. Better to install other versions in a directory such as /usr/local. – slm Sep 19 '14 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.