Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>install GCC 4.8 into Xcode 4.5, Xcode 4.6, Xcode 5.0:</p> <p>for people who have not install GCC 4.8:</p> <p>install the new version of home-brew</p> <p>you can find the method how to install on the Internet</p> <p>update your brew to the latest version (<code>$brew update</code>)</p> <p>1.<code>brew install gcc48 --enable-all-languages</code></p> <p>(may should install mpc, mpfr and gmp through brew, <a href="http://solarianprogrammer.com/2013/06/11/compiling-gcc-mac-os-x/">http://solarianprogrammer.com/2013/06/11/compiling-gcc-mac-os-x/</a>)</p> <p>2.<code>$brew link gcc48</code></p> <p>3.backup g++,gpp,c++,cpp,c++ in <code>/usr/bin/</code></p> <p>4.[optional step]:</p> <p>alias g++-4.8,gpp-4.8,c++-4.8,cpp-4.8,c++-4.8 </p> <p>from <code>/usr/local/Cellar/gcc48/4.8.2/bin/g++</code> </p> <p>to <code>/usr/bin/</code> </p> <p><strong>[above 4 steps for the developer who have not install gcc]</strong></p> <p>5.make plugin</p> <p>1)download <a href="https://code.google.com/p/xcode-gcc-plugin/downloads/detail?name=GCC%204.5.xcplugin.zip&amp;can=2&amp;q=">a plugin of GCC 4.5 for Xcode</a></p> <p>2)change every "4.5" to "4.8", "4_5" to "4_8", the file names, the file contents,</p> <p>except "com.apple.compilers.gcc.headers.4_2” in the file <code>GCC 4.5.xcspec</code>.</p> <p>you can remain contents in <code>English.lproj</code> unchanged, and delete <code>Japanese.lproj</code>.</p> <p>3)in file <code>GCC 4.8.xcspec</code> </p> <p>(hope you have already change the file name of <code>GCC 4.5.xcspec</code> to <code>GCC 4.8.xcspec</code>)</p> <p>change <code>ExecPath = "...”;</code> </p> <p>to <code>ExecPath = "/usr/local/bin/gcc-4.8"</code></p> <p>or <code>ExecPath = "/usr/local/Cellar/gcc48/4.8.2/bin/gcc-4.8"</code> (for the people who install gcc-4.8 by brew)</p> <p>4)delete “-Wshorten-64-to-32” part in file <code>GCC 4.8.xcspec</code> </p> <pre><code>{ Name = "GCC_WARN_64_TO_32_BIT_CONVERSION"; Type = Boolean; DefaultValue = NO; CommandLineArgs = { YES = ( "-Wshorten-64-to-32", ); NO = (); }; AppearsAfter = "GCC_WARN_PROTOTYPE_CONVERSION"; Category = Warnings; CommonOption = NO; DisplayName = "Implicit Conversion to 32 Bit Type"; Description = "Warn if a value is implicitly converted from a 64 bit type to a 32 bit type. [GCC_WARN_64_TO_32_BIT_CONVERSION, -Wshorten-64-to-32]"; } </code></pre> <p>6.put edited <code>GCC 4.8.xcplugin</code> into</p> <p><code>/Applications/Xcode.app/Contents/Plugins/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/</code></p> <p>7.reopen Xcode. </p> <p>Now, the new plugin has already prepared for you. You can see your new GCC compiler plugin in the "Compiler for C/C++/Objective-C" of "Build Settings" of your project</p> <p>8.change Build Settings in Xcode project</p> <p>1)In the <code>project</code> and <code>target</code> settings in Xcode</p> <p>change "Compiler for C/C++/Objective-C" to "GCC 4.8"</p> <p>2)In the <code>project</code> settings</p> <p>delete “CLANG_CXX_LIBRARY" row</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload