LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-08-2010, 10:58 PM   #1
lwb422
LQ Newbie
 
Registered: Mar 2010
Location: china
Distribution: oracle redhat enterprise linux 5
Posts: 3

Rep: Reputation: 0
about gcc version


As a newbie for linux , i am really confused about gcc version.
Aren't the new ones compatible the old ones? But online there is always someone says ,he should install a old suitalbe one for his IDE. I am really confused. If it needs a long words to express the reason clearly, a link or some books you recommend is a good answer. Thanks.
 
Old 04-09-2010, 12:34 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,006

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
I am not a whole lot sure about the IDE reference (maybe someone else can confirm) but it has been
my experience that certain applications (generally old ones) will require older versions of a compiler.
I believe the reason is that to make the necessary changes to the old applications code is such a large
task that it far out weighs simply using the older compiler.
And the reason the changes are required is generally as deprecated options/functions have been replaced.
 
Old 04-09-2010, 05:22 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
The older compilers were much more tolerant with sloppy code.
But you can of course find code written in 1999, that will
compile nice with gcc-4.4.1 !

Porting the code ... to gcc 4.3
http://gcc.gnu.org/gcc-4.3/porting_to.html
and to gcc 4.4
http://gcc.gnu.org/gcc-4.4/porting_to.html

Porting 2,000 files for an application : you probably wouldn't.
But then again, you can have as many compilers as you want,
installed at the same time. Four times gcc / g++ is not unusual.
# yum install compat-gcc-34-c++ gcc-c++ gcc44-c++
.. will provide versions 3.4.6 , 4.1.2 , 4.4.0 for EL 5.
.....

Last edited by knudfl; 04-09-2010 at 05:53 AM.
 
  


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
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 02:54 PM
Installed GCC version doesn't match the version the kernel was compiled with AlucardZero Linux - Software 2 02-07-2008 10:24 AM
redhat fedora gcc version (compiled for 2.4.20) doesn't match kernel version 2.4.22 start1000 Linux - Software 0 03-16-2004 08:17 PM
export CC=/usr/bin/gcc-3.2 - switch gcc version? ferreter Linux - Software 1 08-20-2003 12:07 AM
Sample Driver Module incompatibility with Kernel version (or gcc version) jvs Linux - General 1 06-07-2002 01:40 AM

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

All times are GMT -5. The time now is 04:19 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