LinuxQuestions.org
Review your favorite Linux distribution.
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-04-2008, 10:42 AM   #1
mistretzu
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Rep: Reputation: 0
Question gcc 4.1 vs 4.3 source code compatibility


I have some source code that was compiling well with gcc 4.1, recently I moved to openSuse that has gcc 4.3.1 and the same code fails to compile using this version of compiler.
Generally it complains that it doesn't recognize functions like malloc or wtol. I can easily fix this by including appropriate headers like stdlib.h or what ever is necessary.

But it is important not to change the source code at all. Is it possible to make them compile using 4.3.1? Is there some flag that I can specify to the compiler?
Or do I need to uninstall 4.3.1 and install 4.1?

Thanks.
 
Old 07-04-2008, 04:27 PM   #2
dmail
Member
 
Registered: Oct 2005
Posts: 970

Rep: Reputation: Disabled
You can temporally set the gcc version like so
Quote:
CC=gcc-4.1 make
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Voip Encryption, source code open source LXer Syndicated Linux News 0 07-09-2006 04:21 PM
GCC 4.x backwards compatibility mode antonypaul Programming 1 12-09-2005 01:32 PM
Compatibility between gcc and gcc-lib rajesht Red Hat 1 06-01-2005 01:28 PM
GCC Compatibility JanusPaul Programming 11 03-11-2005 07:32 PM
gcc glibc compatibility shanenin Linux - Software 2 05-17-2004 10:56 PM


All times are GMT -5. The time now is 09:36 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration