This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

how to fix the error : Undefined symbol __gxx_personality_v0


Hi,all:

i am first to program on SUN Solaris, and meet a difficulty.

when i make ,the error message is :

/bin/ksh ./libtool --mode=link g++  -g -O2   -o hello  main.o libhello.la    
g++ -g -O2 -o .libs/hello main.o  ./.libs/libhello.so -R/usr/local/lib
Undefined                       first referenced
 symbol                             in file
__gxx_personality_v0                main.o
ld: fatal: Symbol referencing errors. No output written to .libs/hello
collect2: ld returned 1 exit status
make[1]: *** [hello] Error 1

i finish the same job on CYGWIN,without problems. 

How to fix the problems?

Thanks.
JC Wang


following is my makefile.am and configure.in:
#makefile.am
lib_LTLIBRARIES  = libhello.la   
libhello_la_SOURCES     = hello.cpp
libhello_la_LDFLAGS     = -avoid-version

include_HEADERS         = hello.h 

bin_PROGRAMS            = hello test
hello_SOURCES           = main.cpp
hello_LDADD             = libhello.la   

test_SOURCES           = test.c


#configure.in
AC_INIT(hello,1.0)
AM_INIT_AUTOMAKE

AC_CONFIG_SRCDIR([hello.cpp])
AM_CONFIG_HEADER([config.h])

#CC=cl        
#CXX=cl
#CPPFLAGS=-TP
AC_SUBST(CXX)   
AC_SUBST(CPPFLAGS)   
AC_PROG_CXX
AC_PROG_CC  
AC_PROG_CPP
AC_PROG_RANLIB
AC_C_CONST

#AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL

AC_OUTPUT(Makefile)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]