Mail Archives: djgpp/1997/02/22/22:06:22
On 23 Feb 1997, John Beppu wrote:
>
>
> I tried to use exception handling in C++ for the first time, and
> I'm wondering if this may have something to do with these errors.
> If someone could tell me how I could get rid of these errors,
> please reply. Thanks
>
>
>
> gcc -O2 -lgpp -lm -fhandle-exceptions -fomit-frame-pointer -fforce-mem
-fforce-addr main.o subst.o -o main
Try linking in the libraries at the end of the command line:
gcc -O2 -fhandle-exceptions -fomit-frame-pointer -fforce-addr
main.o subst.o -o main -lgpp -lm
The order (and existance!) of libraries for linking is usually the reason
for underfined reference errors.
> main.cc(.text+0x3cb): undefined reference to `terminate(void)'
> main.cc(.text+0x631): undefined reference to `terminate(void)'
> subst.cc(.text+0xcb7): undefined reference to `terminate(void)'
> subst.cc(.text+0x1701): undefined reference to `terminate(void)'
> make.exe: *** [main] Error 1
>
>
> --
> beppu AT uci DOT edu .............................................................
>
---Michael Phelps
morphine AT cs DOT jhu DOT edu
CH3
|
N
/ |
______/ |
/ \ CH2
_____/ \__|__
// \\ / | \\
// \\______/___CH2 \\
\ / \ /
\______/ \_____/
/ ------ \ / \
OH \ / OH
O
Morphine
- Raw text -