LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-17-2006, 09:10 AM   #1
bandrei
LQ Newbie
 
Registered: Aug 2005
Posts: 12

Rep: Reputation: 0
Unhappy GCC change


hi,

I'm trying to compile a program under gcc-2.95 instead of the gcc-3.3.5 I have.
I tried CC=gcc-2.95 but the version of the gcc doesn't change.
Anyone knows how could I compile using the 2.95?

thanks

Bandrei
 
Old 07-17-2006, 11:23 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Does your makefile use the $CC environment variable? Some may have 'gcc' hardcoded.
 
Old 07-17-2006, 11:57 AM   #3
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
Quote:
Originally Posted by Matir
Some may have 'gcc' hardcoded.
If this turns out to be the case, you can try aliasing gcc in your shell to point to the version you want to use. I think this would overcome that problem.

Also, if the program uses a ./configure script, you could try passing it a --with-gcc=/path/to/old/gcc option.
 
Old 07-18-2006, 10:02 AM   #4
bandrei
LQ Newbie
 
Registered: Aug 2005
Posts: 12

Original Poster
Rep: Reputation: 0
In the end I used
alias gcc=gcc-2.95
and it worked well.

thanks a lot
 
Old 07-18-2006, 10:23 AM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Glad you got it working, and thanks for posting your solution so that it may help others in the future!
 
  


Reply



Posting 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the gcc compiler's default version? aladin Linux - Software 8 10-09-2005 08:07 PM
GCC fork() - Can a child change a parent variable? johnhardey Programming 4 03-10-2005 10:49 AM
1)nvidia installer freezes (psble prob w/ gcc?) and 2) can't change screen resolution DJCF Linux - Hardware 1 02-10-2005 04:23 PM
DISTCC failure and GCC CHOST change jacoby Linux - Software 0 01-20-2005 01:53 AM
File permission display and change in GCC Lord CyKill Programming 1 09-26-2003 07:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration