This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RedHat 7 - GCC Version Problems
- To: <gcc-help at gcc dot gnu dot org>
- Subject: RedHat 7 - GCC Version Problems
- From: Christos Sotiriou <cxs at dcs dot ed dot ac dot uk>
- Date: Fri, 5 Jan 2001 09:26:31 +0000 (GMT)
- cc: Christos Sotiriou <cxs at dcs dot ed dot ac dot uk>
Hello.
I have found problems trying to compile a program with the g++
compiler that ships with RedHat Linux 7.0. My program compiles
fine with the g++ compiler of RedHat 6.2. I realise that the
g++ version is changed. In my case, some of the warning that
I was getting now have become errors and the program will
not compile. I tried using kgcc -x c++ and that seems to work,
but I get library errors when I link the file.
My question is this. How can I tell kgcc to use c++ style
linking? Can I force g++ not to use the ISO/ANSI standards
so my program will compile like in the earlier versions? I
tried the options on the man page, such as -traditional, but
nothing seems to make a difference.
Linking with kgcc gives me the following errors:
(Is this because it uses c style linking, rather than c++?)
/usr/X11R6/lib/libX11.so.6: undefined reference to
`getpwuid_r@GLIBC_2.1.2'
/lib/libpthread.so.0: undefined reference to `__sysctl@GLIBC_2.2'
/lib/libpthread.so.0: undefined reference to `_IO_list_unlock@GLIBC_2.2'
/usr/lib/libGL.so.1: undefined reference to `shmctl@GLIBC_2.2'
/lib/libpthread.so.0: undefined reference to `_IO_iter_file@GLIBC_2.2'
/usr/X11R6/lib/libX11.so.6: undefined reference to
`getpwnam_r@GLIBC_2.1.2'
/lib/libpthread.so.0: undefined reference to `getrlimit@GLIBC_2.2'
/lib/libpthread.so.0: undefined reference to
`_IO_list_resetlock@GLIBC_2.2'
/lib/libpthread.so.0: undefined reference to `_IO_iter_begin@GLIBC_2.2'
/lib/libpthread.so.0: undefined reference to `__libc_sigaction@GLIBC_2.2'
/lib/libpthread.so.0: undefined reference to `_IO_iter_next@GLIBC_2.2'
/lib/libdl.so.2: undefined reference to `_dl_vsym@GLIBC_2.2'
/lib/libpthread.so.0: undefined reference to `_IO_iter_end@GLIBC_2.2'
/lib/libpthread.so.0: undefined reference to `setrlimit@GLIBC_2.2'
/lib/libpthread.so.0: undefined reference to `_IO_list_lock@GLIBC_2.2'
/home/cxs/Qt/qt-2.2.0/lib/libqt.so: undefined reference to
`__res_init@GLIBC_2.2'
/lib/libdl.so.2: undefined reference to `_dl_sym@GLIBC_2.2'
collect2: ld returned 1 exit status
Any suggestions?
Thanks for the help.
Christos Sotiriou.