PDA

View Full Version : Link error using xalan-c with compat-gcc-34-c++



dnivra
29th July 2008, 12:39 PM
Hi,

I recently installed Fedora 9 and ran into the following error when using xalan-c with the compat-gcc package.

$ sudo yum install compat-gcc-34-c++ xalan-c-devel
$ cat x.cc
int main(void) {
return 0;
}
$ g++34 -o x x.cc -lxalan-c
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libxalan-c.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<void const*>(void const*)@GLIBCXX_3.4.9'
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libxalan-c.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)@GLIBCXX_3.4.9'
/usr/lib/gcc/i386-redhat-linux/3.4.6/../../../libxalan-c.so: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<unsigned long>(unsigned long)@GLIBCXX_3.4.9'
collect2: ld returned 1 exit status


I need to use g++34 and cannot use g++ (version 4.3.x) as there are other problems with the code that I need to compile.

Any help on what the problem/fix might be is much appreciated.

Thanks,
Arvind

lazlow
29th July 2008, 06:51 PM
Do you also have:

compat-libstdc++ -33
compat-libstdc++ 296


installed?

dnivra
31st July 2008, 10:05 AM
No I do not have either of those packages installed.

lazlow
31st July 2008, 07:34 PM
Installing them may (or may not) help.

dnivra
1st August 2008, 11:59 AM
I tried that but no luck :(