This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

undefined reference to `__eh_pc'



Hello,

I am a CS student and would like some help in tracking down a problem
I have when linking against a 3rd party library.

Our class is using the book called "C++ Program Design" which comes
with a CD which inludes a library called libezwin.a. 

When linking against this library, the linker complains about an
"undefined reference to `__eh_pc'. I searched a bit and came up with a
link to a egcs mailing list article where the person said that the
__eh_pc symbol had been removed for libgcc in Dec 1997.

I tried the following experiment:
$ strings libgcc.a | grep __eh_pc
which came up empty. Next, I tried:
$ strings libezwin.a | rep __eh_pc
and found the library did contain the __eh_pc symbol.

First, am I right in thinking that to fix my problem, I need to get
the authors to re-build their library with a newer version of g++?
What other solution might I have? 

If I wasn't clear it's because I don't understand the issue
completely. I have atached the output errors I get from trying to
build the program, along with some other miscelaneous info which may
be relavent.

Thanks for taking the time to read this.

The author of the library claims it was compiled with egcs-2.90.27
I am using:
Debian/GNU Linux with
ii  gcc             2.7.2.3-7      The GNU C compiler.
ii  g++             2.91.60-5      The GNU (egcs) C++ compiler.
ii  libc6           2.0.7.19981211 GNU C Library: shared libraries
ii  libstdc++2.9    2.91.60-5      The GNU stdc++ library (egcs
version)

If I left anything out, please let me know.

--
   Jim Foltz   <aa204@acorn.net>
ACORN techie   <http://www.acorn.net>
      AOL/IM   jim_foltz
make lawn
make[1]: Entering directory `/home/jf/ezwin-egcs-2.90.27/chap03/lawn'
g++ -o lawn prog3-5.o -L/usr/X11R6/lib -lX11 -L../../EzWindows/lib -lezwin -lXpm
../../EzWindows/lib/libezwin.a(WindowManager.o): In function `SimpleWindow::SimpleWindow(basic_string<char, string_char_traits<char>, __default_alloc_template<1, 0> > const &, float, float, Position const &)':
WindowManager.o(.text+0x31c): undefined reference to `__eh_pc'
../../EzWindows/lib/libezwin.a(WindowManager.o): In function `SimpleWindow::SimpleWindow(char const *, float, float, Position const &)':
WindowManager.o(.text+0x3e8): undefined reference to `__eh_pc'
../../EzWindows/lib/libezwin.a(WindowManager.o): In function `SimpleWindow::SimpleWindow(SimpleWindow const &)':
WindowManager.o(.text+0x4d4): undefined reference to `__eh_pc'
WindowManager.o(.text+0x4f4): undefined reference to `__eh_pc'
WindowManager.o(.text+0x514): undefined reference to `__eh_pc'
../../EzWindows/lib/libezwin.a(WindowManager.o)(.text+0x534): more undefined references to `__eh_pc' follow
../../EzWindows/lib/libezwin.a(WindowManager.o): In function `release__Q2t12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b1i03Rep':
WindowManager.o(.gnu.linkonce.t.release__Q2t12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b1i03Rep+0x13): undefined reference to `__dl__Q2t12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b1i03RepPv'
../../EzWindows/lib/libezwin.a(WindowManager.o): In function `grab__Q2t12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b1i03Rep':
WindowManager.o(.gnu.linkonce.t.grab__Q2t12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b1i03Rep+0xf): undefined reference to `clone__Q2t12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b1i03Rep'
../../EzWindows/lib/libezwin.a(rect.o): In function `RectangleShape::RectangleShape(SimpleWindow &, Position const &, color const &, float, float)':
rect.o(.text+0x4d): undefined reference to `__eh_pc'
../../EzWindows/lib/libezwin.a(rect.o): In function `RectangleShape::RectangleShape(SimpleWindow &, float, float, color const &, float, float)':
rect.o(.text+0xf0): undefined reference to `__eh_pc'
rect.o(.text+0x10d): undefined reference to `__eh_pc'
../../EzWindows/lib/libezwin.a(rect.o): In function `RectangleShape::Draw(void)':
rect.o(.text+0x330): undefined reference to `__eh_pc'
rect.o(.text+0x350): undefined reference to `__eh_pc'
../../EzWindows/lib/libezwin.a(rect.o)(.text+0x370): more undefined references to `__eh_pc' follow
collect2: ld returned 1 exit status
make[1]: *** [lawn] Error 1
make[1]: Leaving directory `/home/jf/ezwin-egcs-2.90.27/chap03/lawn'
make: *** [default] Error 2