LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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


Closed Thread
  Search this Thread
Old 02-08-2005, 12:22 PM   #1
prakashpms
LQ Newbie
 
Registered: Jun 2004
Posts: 15

Rep: Reputation: 0
Migrating from gcc 2.96 to 3.3.3


Hi,

I am facing problem while migrating an application from gcc 2.96 to gcc 3.3.3. The application was previously compiled on RedHat AS 2.1 and now I am compiling on Suse 9.1.

The program is something like this.

#include <string>

main()
{
string tmpString;
...................
}

It is compiling properly on RedHat AS 2.1 using gcc 2.96. On Suse 9.1 using gcc 3.3.3, it gives the following error.

error: 'string'undeclared (first use this function)
error: (Each undelcared identifier is reported only once for each function it appears in.)
error: syntax error before ';' token

Is there big difference between gcc 2.96 and 2.96. If I use 'using namespace std', I am able to resolve the compilation problem, but encounter the undefined reference linker error for std::basic_string.

Please let me know how do we solve this problem. Also, it will be helpful if you can point to any document for migrating from gcc 2.96 to 3.3.3.

Thanks & Regards
Prakash
 
Old 02-08-2005, 12:47 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

Please continue here:
http://www.linuxquestions.org/questi...hreadid=287739
 
Old 02-08-2005, 02:52 PM   #3
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
3.3 is newer and does not allow some things that 2.96 will allow (it was probably deprecated (meaning it's legal with 2.96 but will be illegal at some point)). try to use the std namespace or use std::string and make sure you have the g++-libs/gcc-libs installed.
 
Old 02-08-2005, 03:03 PM   #4
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
maybe gccc 3.3 is not backward compatible

it is good practise to use namespace std

regards
 
  


Closed Thread


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
install after or before gcc,binutils,make,module-init when migrating kernel 2.6 eatmars Linux - Software 1 10-02-2005 12:52 PM
Migrating from gcc 2.96 to 3.3.3 prakashpms Programming 3 02-09-2005 03:08 AM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 02:13 PM
Migrating IglooGuy LinuxQuestions.org Member Intro 1 11-09-2003 03:36 PM
export CC=/usr/bin/gcc-3.2 - switch gcc version? ferreter Linux - Software 1 08-20-2003 12:07 AM

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

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