[Mac OS X] gcc版本的选择

在OSX下编译wxWidgets时遇到问题:

checking for C compiler default output file name... configure: error: C compiler cannot create executables

在网上查方案,说是gcc没有装好造成的。网上提供的对linux的解决方案是sudo apt-get install libc6-dev,这不适用于Mac OS X。
实际上是gcc的版本没有选择对。使用下面命令选择gcc版本就可以了:

$sudo gcc_select gcc42

你可能感兴趣的:(Mac OS X)