LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   gcc 3 and gcc 2.96 (https://www.linuxquestions.org/questions/programming-9/gcc-3-and-gcc-2-96-a-61879/)

dsantamassino 05-26-2003 08:00 AM

gcc 3 and gcc 2.96
 
I'm using Redhat Linux 9. How do i uninstall gcc 3 and install gcc 2.96?? Would gcc 3 and gcc 2.96 be under the add/remover applications?? Please reply back. Thanks.

aizkorri 05-26-2003 08:17 AM

I think you can install the gcc 2.96 rpm without uninstalling gcc3, and it should work under the name gcc-2.96. Maybe it isn磘 in the redhat cd but you can download it. Anyway, why do you need to install gcc2.96 having a newer version?

dsantamassino 05-26-2003 08:30 AM

I need to uninstall gcc 3 and install gcc 2.96 so i can install my modem drivers. Can you tell me where i can download gcc 2.96 from? Can you give me instructions on how to install gcc 2.96? Thanks.

j-ray 05-27-2003 03:46 AM

http://rpmfind.net/linux/rpm2html/se...?query=gcc2.96
this one's from mandy but the only one i found
version 2.95 is available everywhere
http://gcc.gnu.org

but maybe u prefer a tar-gunzipped binary, just download and follow the INSTALL instructions.
cheers, jens

aizkorri 05-27-2003 04:07 AM

The best rpm browser I know is http://www.pbone.net/ ,there you can find a lot of RPMs for Redhat, Mandrake, etc...

llama_meme 05-30-2003 05:41 AM

I wouldn't uninstall gcc3, though. You could run into all sorts of problems trying to compile against gcc2 compiled libraries with gcc3 (I think this may be a problem with C++, anyway). It should be possible to have both compilers installed at one.

Alex

realos 06-02-2003 02:26 AM

dsantamassino,

as others pointed out, I would not deinstall gcc3 but rather install gcc-2.95 in another directory, let's say /your/directory/bin/ and put this directory as the first one in your path.

export PATH=/your/directory/bin:$PATH

If needed you can make a link to gcc-2.95:

ln -s /your/directory/bin/gcc-2.95 /your/directory/bin/gcc

This way all the calls for gcc compiler will end up at gcc-2.95 and you still have gcc-3 at your hand if needed later.

Personally, I did have some problems with gcc-3 as trying to compile some VoIP software. gcc-2.95 seems to be the most stable compiler around and it has been widely tested and used. I would stay with 2.95-3 if there is no compelling need to take any other version.

jentleman 06-02-2003 10:36 PM

help!!!my visit.c access sybase still failed
 
Hi:

how r u?!
i'm a Chinese man ,a lover of LINUX,i'm very glad to get ur email ,and very glad to make friends with u .
now ,i have a question need ur help ,that my visit.c can't access sybase DATABASE ,the step and result as follow:

tell me ,what shall i do????

some wrong remains when i compile my C code under LINUX.

my visit.c access sybase still failed ,i have no any idea ,so ,i need ur help !
any way, i appricate ur help !^_^and look forward to ur helping ,answer me as quickly as u can please !
my email: xhs1314@cmmail.com

my OS : LINUX REDHAT 8.0
gcc version : 3.2.2
DB : sybase


/*the file name:visit.c */
#include<stdlib.h>
#include<string.h>
#include<sybfront.h>
#include<sybdb.h>
#include<syberror.h>

LOGINREC *loginrec;
DBPROCESS *dbproc;
RETCODE return_code;
char organ_no[5],account_no[6];
unsigned amount;
char cmdstr[450];

int
main(int argc,char **argv)
{
strcpy(organ_no,"0301");
strcpy(account_no,"00802");
amount=888.88;
organ_no[4]=account_no[5]='\0';
sprintf(cmdstr,"execss_jz\' %s\',\'%s\',\'%d\'",organ_no,account_no,amount);
conn_init();

system ("clean");
printf ("\n\n\n count success!");
getchar ();
dbexit ();
}
conn_init()
{
if(dbinit()==FAIL)printf("initionalize fail!");
if((loginrec=dblogin())==NULL)printf("register fail!");
if((DBSETLPWD(loginrec,"nhusr"))==FAIL)printf("DATABASE password error ");
if((dbproc=dbopen(loginrec,NULL))==NULL)printf("can't connect to DB");
if((dbuse(dbproc,"nhdb"))==FAIL)printf("open the DB fail!");
}

编译上面的文件结果如下:
file://when i compile the visit.c ,the result as follow:
[root@server test]# gcc -I. -I/opt/sybase-11.9.2/include visit.c /opt/sybase-11.9.2/lib/libsybdb.a -o visit /opt/sybase-11.9.2/lib/libsybdb.a(dbcursut.o)(.text+0xbb): In function `db__crs_search_phrase':
: undefined reference to `__ctype_tolower'
/opt/sybase-11.9.2/lib/libsybdb.a(dbcursut.o)(.text+0x110): In function `db__crs_search_phrase':
: undefined reference to `__ctype_tolower'
/opt/sybase-11.9.2/lib/libsybdb.a(intslist.o)(.text+0x17e): In function `intl__strblist':
: undefined reference to `__ctype_b'
/opt/sybase-11.9.2/lib/libsybdb.a(intnent.o)(.text+0xbf): In function `intl_nextentry':
: undefined reference to `__ctype_b'
/opt/sybase-11.9.2/lib/libsybdb.a(intnent.o)(.text+0x113): In function `intl_nextentry':
: undefined reference to `__ctype_b'
/opt/sybase-11.9.2/lib/libsybdb.a(intnent.o)(.text+0x1b6): In function `intl_nextentry':
: undefined reference to `__ctype_b'
/opt/sybase-11.9.2/lib/libsybdb.a(intnval.o)(.text+0x429): In function `intl_nextvalue':
: undefined reference to `__ctype_b'
/opt/sybase-11.9.2/lib/libsybdb.a(intnval.o)(.text+0x453): more undefined references to `__ctype_b' follow
collect2: ld returned 1 exit status


用Makefile执行的结果也同上面一样
when i excute with Makefile (as follow ),same result appear,
/* Makefile */
visit:visit.c
gcc -I. -I/opt/sybase/include visit.c /opt/sybase-11.9.2/lib/libblk.a /opt/sybase-11.9.2/lib/li
bcomn.a /opt/sybase-11.9.2/lib/libcs.a /opt/sybase-11.9.2/lib/libct.a /opt/sybas
e-11.9.2/lib/libintl.a /opt/sybase-11.9.2/lib/libsybdb.a /opt/sybase-11.9.2/lib/
libsybtcl.a -o visit


[root@server root]#cd /opt/sybase-9.11.2/lib
[root@server lib]# ls
examples.so libcomn.so libct.a libintl.a libssfile.so libsybdb.a libsybtcl.so
libblk.a libcs.a libct.so libintl.so libsstasks6.so libsybdb.so sybsyesp.so
libcomn.a libcs.so libinsck.so libssencode.so libsstools6.so libsybtcl.a xpsmsgs.so

deepsix 06-03-2003 06:07 PM

There is a gcc 3.2 backwards compatible to gcc 2.96 rpm available at redhat network hope this helps


All times are GMT -5. The time now is 07:11 PM.