gcc 4.9.1 in OS X Yosemite - gcc: warning: couldn’t understand kern.osversion ‘14.0.0'

前端 未结 10 1847
醉梦人生
醉梦人生 2020-12-13 19:18

I install OS X Yosemite and now i have a huge problem with gcc 4.9.1 compiler. I hope some one can help me please.

I try to compile my program and i have the warning

相关标签:
10条回答
  • 2020-12-13 19:41

    I had a similar issue when building things from source, and it was because I forgot to install the updated command line tools after upgrading to Yosemite and xcode 6.1. Try this in your command line:

    xcode-select --install 
    

    That will download and install the command line tools and may fix your problem.

    0 讨论(0)
  • 2020-12-13 19:50

    This was enough for me, and it doesn't require any symlink:

    export CC=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc
    

    After that, just run the command as usual.

    0 讨论(0)
  • 2020-12-13 19:51

    I had this issue, installed Xcode cli tools (xcode-select --install), and still had issues. I'd upgraded from Yosemite to Mojave, and uninstalling an older version of the compiler worked for me:

    brew uninstall apple-gcc42
    

    Hope this helps someone!

    0 讨论(0)
  • 2020-12-13 19:52

    This solve my problem: I link gcc with /Applications//Xcode.app/Contents/Developer/usr/bin/gcc

    cd /usr/local/bin
    ln -s /Applications//Xcode.app/Contents/Developer/usr/bin/gcc gcc
    
    0 讨论(0)
提交回复
热议问题