GCC is the GNU Compiler Collection. It's the de facto standard C compiler on Linux and older versions of OS X.

learn more… | top users | synonyms

0
votes
0answers
17 views

Tried to compile asm code with a C wrapper, but following message appeared: [on hold]

I was trying to compile an assembly code with a C wrapper code using gcc compiler, but instead of creating an object file the following message appeared: > Adams-MacBook-Pro:Adam ...
0
votes
1answer
27 views

ld: library not found for -lgcc

After a brew upgrade every time I try to compile a .c file I get the following error: ld: library not found for -lgcc collect2: error: ld returned 1 exit status Wrappers like mpicc still work though....
1
vote
1answer
21 views

How can I reinstall gcc?

Im new with mac and tried to install gcc / g++ on an MacBook Air with El Captain. I installed Xcode and used xcode-select --install It completed and was successful. However, for some reason I ...
0
votes
1answer
40 views

Downgrade GCC version

How do I downgrade my GCC v5 to GCC version 4.7 ? I currently don't have Xcode installed and I am using the command line tool. More details : Apple LLVM version 7.3.0 (clang-703.0.29) Target: ...
1
vote
0answers
15 views

GCC 5.X integration on Xcode 6

I need to use/integrate GCC 5.X (in my case 5.3, and it is already installed) on Xcode 6.2. I've found a lot of outdated tutorials about GCC 4.X and Xcode 5 (or lower), but all of them are outdated ...
0
votes
0answers
84 views

Xcode in Yosemite (10.10.5)

I have Yosemite (10.10.5) and I can't upgrade my Xcode. Basically, I'm interested in use GCC on this SO but in App Store i can't upgrade for Yosemite. P.S: I saw in previous posts that someone has ...
0
votes
0answers
119 views

Using gcc on El Capitan

I installed gcc using xcode-select --install. However, I think it's trying to compile my C code as C++ code. This is what I get when I type gcc --version in Terminal: gcc --version Configured with: -...
14
votes
5answers
53k views

How to set gcc 4.8 as default gcc compiler

I recently installed gcc 4.8 using brew on OSX 10.7.5 (Lion). I can now compile using gcc 4.8 by using g++-4.8 some_file.c or using the default gcc 4.2 by using g++ some_file.c I want to use gcc ...
3
votes
0answers
194 views

Accept Xcode 7.3 license

I want to install a C/C++ compiler for Matlab R2015b. I am running OSX El Capitan 10.11.3. I installed the newest version of Xcode (Xcode Version 7.3 beta 3). According to MathWorks, Xcode 7.x ...
0
votes
1answer
692 views

How do I build and install gcc5 in OS X 10.11 without Xcode?

Obviously installing gcc from source will require a compiler to build it; is it possible to install gcc without Xcode?
0
votes
0answers
30 views

Is the C compiler used in Xcode ANSI-compliant?

I need to build php from source but when I compile php and apache with xcode, Compiler logs some warnings about "deprecated" uses however I use latest tools. So I found out that apache recommends "...
3
votes
2answers
2k views

Homebrew: how to switch between GCC versions `gcc49` and `gcc`?

I foolishly uninstalled GCC 4.9 after brew upgradeing to GCC 5. However I need both versions and I need to be able to switch back and forth. I thought I could just do brew switch 4.9.2 but the old ...
10
votes
3answers
13k views

How to accept Xcode license?

I want to install a C based toolbox on Matlab software. To do this, I should install GCC compiler. I think I have done that already. And also I have Xcode too. To setup the toolbox I need to write "...
0
votes
0answers
112 views

Compiling Ghostscript in El Capitan

I'm trying to compile Ghostscript-9.18 ( i need libgs ) and I've run into the new Rootless Security stuff when I try to install the libs. How do I change the target from /use/include to /usr/local/...
0
votes
2answers
405 views

How to get the default compiler of c++ on Mac os x

I am new in c++ on Mac os x and I need to know how to get some details: How to get the default compiler c++/c? How to change the default compiler? How to set the compiler in a CMakelists.txt file ...
3
votes
1answer
3k views

How do I use GCC on El Capitan?

I installed gcc via homebrew with no errors. brew install homebrew/versions/gcc49 brew unlink gcc49 && brew link gcc49 But when I try to run gcc, clang is used instead. ~$:gcc --version ...
2
votes
1answer
753 views

compile error: <atomic> is not implemented

When I compile a open source program called gate with "make" I have this error message: error <atomic> is not implemented I must add that I know this program and I compiled it several times ...
0
votes
1answer
331 views

homebrew gcc-5 fails to find any standard library

I am running os x version el capitan and have installed gcc5 via homebrew. However, compiling simple programs such as: #include <stdio.h> int main() { printf("Hello world\n"); return 0;...
1
vote
2answers
2k views

Can't compile source code on mac

I already have xcode installed on OSX Yosemite. I have also run it and accepted terms and conditions. I can also do gcc --version and I see Configured with: --prefix=/Applications/Xcode.app/Contents/...
1
vote
2answers
302 views

brew not linking gcc after install?

Why does brew not link gcc properly? What am I missing? $>brew install gcc49 --without-multilib ==> Installing gcc49 from homebrew/homebrew-versions ==> Downloading http://ftpmirror.gnu.org/...
0
votes
0answers
25 views

Restoring C++ Compiler

I needed the OpenMP C++ library so I followed the instructions in this post to install GCC since Clang does not support OpenMP. I have OS X Mountain Lion and installed GCC4.9. I do not know what went ...
0
votes
3answers
1k views

switch back to clang after installing gcc through Macports on Mavericks

After I installed Macports (and after that I have installed several versions of gcc through Macports), whenever I type gcc, one of those gcc installed through Macports will be invoked. Before I ...
10
votes
3answers
10k views

I installed Xcode but I still don't have gcc in my terminal

I just got a Mac and I'm a complete newbie, so this may be kind of a really easy question, but I wasn't able to solve it with Google or F1. I was trying to run a C program from the Terminal that ...
22
votes
2answers
12k views

How to compile mod_wsgi, mod_fastcgi, etc on Mountain Lion (Mavericks) by fixing `apxs:Error: Command failed with rc=65536`?

I've updated to OS X Mountain Lion. Update has removed all of my python and apache modules including mod_wsgi. Now I'm trying to recompile mod_wsgi (it compiled without problems on Lion). I use ...
1
vote
1answer
60 views

“Failure while executing” error when trying to install GCC

I've followed the instructions of the both the accepted answer to this question as well as the other suggestions, How do I install GCC via Homebrew?. But all I get is the following message when I run ...
3
votes
1answer
789 views

Sorting out compile errors when using multiple different versions of Xcode

I am on Yosemite and trying to compile a software package using g++. Compiling this particular package has previously worked on Mountain Lion under Xcode 4.6.3, but now I have Xcode 6.1.1, and the ...
2
votes
1answer
220 views

installing old version of c++ compiler

I use OSX 10.10.5 need to compile some c++ code with an old version of gcc, namely 4.3.4. I don't think XCode provide that kind of tools. I suppose there is a way to do that by hand. How can I do that ...
0
votes
0answers
358 views

gcc: error: unrecognized command line option ‘--stack=8000000’

I am trying to build a project using a flag --stack=8000000 because my application may require a huge memory in future, but I am facing the error. gcc: error: unrecognized command line option ‘--...
1
vote
2answers
149 views

Where are g++ stl libraries in Darwin

I am trying to understand how some of the data structures are designed in stl. In ubuntu, I usually open the .h and .cpp files from /usr/local/include but in Darwin (kernel version 14.3.0) I am lost, ...
0
votes
1answer
566 views

homebrew libgfortran

My Python app is using scipy which apparently needs libgfortran. After a recent brew update/upgrade, my Python app fails to run due to a libgfortran dependency issue: dlopen(<snip>/scipy-0.14.0-...
1
vote
1answer
261 views

How to link back to the correct C compiler?

While trying to install fink-0.38.4 I get the ERROR: There is no C compiler on your system. Make sure that the Developer Tools are installed. I have got errors about missing a C compiler while trying ...
1
vote
0answers
2k views

Command line tool installed, but gcc/g++ compiler not working

Heads up, I have a similar problem such as in this question, but it wasn't resolved: how to debug configure.sh errors when compiling rsync on Yosemite So basically I am looking to compile code via ...
1
vote
1answer
1k views

how to debug configure.sh errors when compiling rsync on Yosemite

I am trying to build myself a new version of rsync 3.1.1 under Mac OS 10.10.3, as the mac comes with an older version, and the project does not distribute binaries. I followed this simple script but ...
2
votes
2answers
4k views

Uninstall OSX-gcc-installer without first installing Xcode

Is there a way that I can uninstall osx-gcc-installer without first having to install Xcode, then run sudo /Developer/Library/uninstall-devtools —mode=all ? I installed it on Mountain Lion, and I ...
2
votes
0answers
551 views

what is difference between gcc version and Xcode gcc version?

This maybe a little silly question but I am very confused executing pkgutil in shell I get $ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables package-id: com.apple.pkg.CLTools_Executables ...
1
vote
1answer
165 views

Use specific local gcc and related libraries with Homebrew

I would like to use Homebrew to install some stuff, In the mean time, I have already installed my local gcc, and I want Homebrew to use this specific one (this gcc at /usr/local/bin/gcc is frequently ...
0
votes
1answer
1k views

Yosemite - Change default C and fortran compilers

I am struggling to build a climate model that depends heavily on C and Fortran compilers installed on the machine. I installed XCode and its default compilers, but I had to install more recent ...
2
votes
2answers
5k views

Can Xcode compile C programs?

For the last couple of hours, I have been trying to find and install a gcc compiler so that I can compile C programs using eclipse C/C++ IDE. Eclipse doesn't come with a compiler, so I tried to find ...
1
vote
0answers
920 views

Homebrew default compiler

I have read similar topics here, but unfortunately these solutions does not help me. I would like to recompile all installed software (or at least some formulas) from Homebrew using gcc from Homebrew....
0
votes
0answers
82 views

building gcc 4.9.2 with Java enabled; command top_builddir not found

Building gcc fails if Java is enabled and the command make is run from another make file (an automation script). The process run smoothly if Java is either not enabled or when i goto build directory ...
2
votes
1answer
608 views

GCC : Command not found

I'm very new to Mac and right now my operating system is 10.10 Yosemite. I installed XCode and Xcode CLT, gcc came along with it as well. I was asked to change the default compiler to gcc. I went ...
1
vote
0answers
103 views

MAC HPC GNU or MAC PORT GNU

I have been using the gcc compiler from http://hpc.sourceforge.net/index.php for 6 years. Unfortunately they are not using the most up to date compiler. I have already installed gcc 4.8.3 from mac ...
2
votes
3answers
30k views

Install gcc to mac via Terminal

I have installed Xcode and the command line tools from the Mac Developers website, which I have read a few times is a prerequisite. I also installed the MacPorts program. In terminal: sudo port ...
59
votes
5answers
122k views

How do I install GCC via Homebrew?

I am using Homebrew exclusively (i.e. I don’t, and won’t, use MacPorts or Fink). I also want to keep manual installations to a bare minimum.1 … But how can I install GCC? First of all, I’ve of ...
1
vote
3answers
4k views

Issue installing GCC using homebrew (scipy package dependency)

I am attempting to install the scipy (Scientific Python, including matplotlib) package using homebrew, and I noticed that it fails when it needs to install a dependency (gcc version 4.9.0). I ...
2
votes
2answers
3k views

How do I install GCC and make on a mac without administrator access or using Xcode?

I'd like to install gcc and make on my Macbook Air, but I don't have root access on it. I found this link through searching on google, but I have no idea how to set up the prefix's so that the actual ...
1
vote
1answer
2k views

How do I specify what is used as the real C compiler?

I have a configure on Mountain Lion that's running into trouble: [snip] checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc checking whether the C ...
0
votes
0answers
152 views

OSX 10.9: GCC standalone (non-admin)

I have a Mac Mini at home, with my own administrator account. My school provides MacBook Airs. I have XCode installed on the Mini, but I only use the command line extensions-- GCC, G++, etc. I don't ...
1
vote
1answer
438 views

Compile error OSX

I'm trying to compile a program called PEAR enter link description here and seems there is something wrong at this step. I have Xcode installed. Thanks for your help, Bernardo Bernardos-MacBook-Pro:...
0
votes
1answer
166 views

Can I compile mpich 3 with gcc 4.9 on Mavericks?

I am trying to compile mpich 3 on a Mac Pro with Mavericks using gcc 4.9. Has any one had luck doing this? My machine is hanging on configure step.