开发者

gcc version 4.1.2 in mac os x

开发者 https://www.devze.com 2022-12-16 05:07 出处:网络
I am taking a programming class and we are required to use the gcc 4.1.2 compiler to compile our c++ projects. I will be creating my projects in xcode and can\'t find how to set that compiler. I went

I am taking a programming class and we are required to use the gcc 4.1.2 compiler to compile our c++ projects. I will be creating my projects in xcode and can't find how to set that compiler. I went to the get info window on the project and hit the drop down under Compiler Version, however I do not开发者_如何学Go have 4.1.2 on the list. It seems that this compiler is not installed on my computer. Does anybody know where I can download it and how I can set it as my system default gcc compiler for the term?


You can probably get away with using whatever version of GCC is on your Mac, and doing a final compile on the university machines as a check. In general, the user visible changes using a later version is stricter syntax checking, so you might do something on the Mac that won't pass a newer compiler, but that generally isn't too common. I haven't had to change more than a few lines on our 50k line codebase.


With the current developer tools, only gcc 4.0 and 4.2 are available. You could probably get gcc 4.1.2 via MacPorts, however, I'm not sure whether you can integrate it into XCode.

Before you try this, you should maybe first check with the class instructor whether it is really necessary to use exactly 4.1.2, or if it is OK to use 4.0 resp. 4.2 instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消