LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-17-2006, 08:36 PM   #1
raid517
Member
 
Registered: Feb 2002
Posts: 393

Rep: Reputation: 30
How to specify a specific compiler version?


Hi, I am trying to compile an app that isn't included in my disrto's repos. Unfortunately the app doesn't seem to be playing too well with GCC 4.0x.

Is there a way I can specify which compiler the app should use during compiling?
 
Old 06-17-2006, 08:52 PM   #2
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Do you have multiple versions of gcc installed? Knowing your distro would help a lot, you should put it in your profile so we can all see.

Code:
CC=/opt/gcc-3.3.6/bin/gcc make
You coujld use $CC to point to the compiler executable but depending on your distro etc, there are better ways.
 
Old 06-17-2006, 09:48 PM   #3
raid517
Member
 
Registered: Feb 2002
Posts: 393

Original Poster
Rep: Reputation: 30
I'm using Debian thanks. And if I don't have a suitable version of GCC installed - it is no hassle to install one.

It's just this specific version of GCC that the app doesn't seem to like.
 
Old 06-17-2006, 11:02 PM   #4
fedora4002
Member
 
Registered: Mar 2004
Posts: 135

Rep: Reputation: 15
Unfortunatley, you can only install multiple versions of GCC. There is no way for you to specify which version to use.
 
Old 06-17-2006, 11:38 PM   #5
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
Quote:
Originally Posted by fedora4002
Unfortunatley, you can only install multiple versions of GCC. There is no way for you to specify which version to use.
If the source uses a configure script just add CC=[gcc-version] to the end. E.g.
./configure CC=gcc-3.4
 
Old 06-18-2006, 07:36 AM   #6
raid517
Member
 
Registered: Feb 2002
Posts: 393

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by fedora4002
Unfortunatley, you can only install multiple versions of GCC. There is no way for you to specify which version to use.
What?

Erm... I wasn't sure how... but I am pretty sure it can be done.

GJ
 
Old 06-18-2006, 07:42 AM   #7
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
If your app dosen't come with a configure script the gcc command should be set in the Makefile anyway, just change that.
 
Old 06-18-2006, 09:33 AM   #8
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
As I said, 99% of Makefiles will use the CC environment variable, use it too.
 
  


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
Making make use a specific gcc version np_ Programming 2 09-01-2005 09:08 PM
downloading a specific version of mozilla via cvs whansard Linux - Software 0 04-30-2004 02:29 PM
compiler version albean Linux - Newbie 1 11-22-2002 03:33 PM
Compiler version max2878 Linux - Software 0 03-01-2002 09:58 AM
compiler version max2878 Linux - General 0 02-27-2002 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:56 AM.

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