Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Gcc_Select Question

Gcc_Select Question
Thread Tools
Mac Enthusiast
Join Date: Feb 2003
Location: Portland, Oregon
Status: Offline
Reply With Quote
May 15, 2003, 04:35 PM
 
I'm a CS student, and use my iBook for coding all my programs, less IA-32 specific assembly, at which point I SSH into a Debian box I have. Dependent on the class I'm taking, the GCC build that the professors use to compile our code changes. I solve this by coding on my iBook, and then when the code is complete, I upload the source to whatever rig the professors will be using to compile the code, just to make sure that that particular GCC compiles the code just fine. I rarely run into trouble, but I was reading a mac / unix book and it appears that there might be an easier way. I found that gcc_select 2 will switch my version of GCC to 2.95, and gcc_select 3 will bring my GCC back to default 3.1. Is there a way for me to add other GCC builds to this gcc_select command? Can I have it select between more than 2 gcc builds? What's the limit?
Thanks;
jesse ;-)
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
May 15, 2003, 11:14 PM
 
The /usr/bin/cc or gcc you typically reference in the shell or in PB is just a symlink to the /usr/bin/gcc2 or /usr/bin/gcc3 binary. And /usr/sbin/gcc_select is just a shell script to conveniently automate the process of changing which binary the symlink points to.

So if you wanted to add additional versions of gcc to your installation, you could install them with unique names in, say, /usr/local/bin, and then edit gcc_select so it knows how to switch among them and put it in /usr/local/sbin.
Rick Roe
icons.cx | weblog
     
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
May 15, 2003, 11:20 PM
 
[Edit: double post]
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:33 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2