Z
zqiang320
Hello:
I execute make ,then get error:
$ make
Making all in libsbml/src
make[1]: Entering directory `/home/internet/mydoc/test_pj/libsbml/src'
........
/bin/sh ./libtool --tag=CC --mode=link gcc -g -O2 -o test test.o
libsbml/src/libsbml.la -lsbml -lstdc++ -lm
mkdir .libs
gcc -g -O2 -o .libs/test test.o libsbml/src/.libs/libsbml.so -lstdc++
-lm -Wl,--rpath -Wl,/usr/local/lib
libsbml/src/.libs/libsbml.so: undefined reference to `safe_strdup'
libsbml/src/.libs/libsbml.so: undefined reference to
`util_bsearchStringsI'
libsbml/src/.libs/libsbml.so: undefined reference to `safe_malloc'
libsbml/src/.libs/libsbml.so: undefined reference to `util_PosInf'
libsbml/src/.libs/libsbml.so: undefined reference to `util_isInf'
libsbml/src/.libs/libsbml.so: undefined reference to `util_NaN'
libsbml/src/.libs/libsbml.so: undefined reference to `safe_calloc'
libsbml/src/.libs/libsbml.so: undefined reference to
`strcmp_insensitive'
libsbml/src/.libs/libsbml.so: undefined reference to `c_locale_strtod'
Why system can not find these function ,they are system file
<stdlib.h> <new> <cmath>
which has been included in my app.c.
What should I do?
Eager to receive your reply!
my configure.in file:
AC_INIT(main, 0.1, (e-mail address removed))
AM_INIT_AUTOMAKE(foreign)
AC_PROG_CC
AC_PROG_CXX
AM_PROG_LIBTOOL
AC_OUTPUT(Makefile libsbml/src/Makefile)
my Makefile.am file:
bin_PROGRAMS = test
SUBDIRS = libsbml/src .
test_SOURCES = test.c
test_LDADD = libsbml/src/libsbml.la -lsbml -lstdc++ -lm
AM_CPPFLAGS = -Ilibsbml/include
my libsbml/src/Makefile.am
AUTOMAKE_OPTS = gnu
lib_LTLIBRARIES = libsbml.la
libsbml_la_SOURCES = common/libsbml-version.cpp math/ASTNode.cpp math/
FormulaTokenizer.c util/List.cpp
AM_CPPFLAGS = -I../include -lsbml -lstdc++ -lm
I execute make ,then get error:
$ make
Making all in libsbml/src
make[1]: Entering directory `/home/internet/mydoc/test_pj/libsbml/src'
........
/bin/sh ./libtool --tag=CC --mode=link gcc -g -O2 -o test test.o
libsbml/src/libsbml.la -lsbml -lstdc++ -lm
mkdir .libs
gcc -g -O2 -o .libs/test test.o libsbml/src/.libs/libsbml.so -lstdc++
-lm -Wl,--rpath -Wl,/usr/local/lib
libsbml/src/.libs/libsbml.so: undefined reference to `safe_strdup'
libsbml/src/.libs/libsbml.so: undefined reference to
`util_bsearchStringsI'
libsbml/src/.libs/libsbml.so: undefined reference to `safe_malloc'
libsbml/src/.libs/libsbml.so: undefined reference to `util_PosInf'
libsbml/src/.libs/libsbml.so: undefined reference to `util_isInf'
libsbml/src/.libs/libsbml.so: undefined reference to `util_NaN'
libsbml/src/.libs/libsbml.so: undefined reference to `safe_calloc'
libsbml/src/.libs/libsbml.so: undefined reference to
`strcmp_insensitive'
libsbml/src/.libs/libsbml.so: undefined reference to `c_locale_strtod'
Why system can not find these function ,they are system file
<stdlib.h> <new> <cmath>
which has been included in my app.c.
What should I do?
Eager to receive your reply!
my configure.in file:
AC_INIT(main, 0.1, (e-mail address removed))
AM_INIT_AUTOMAKE(foreign)
AC_PROG_CC
AC_PROG_CXX
AM_PROG_LIBTOOL
AC_OUTPUT(Makefile libsbml/src/Makefile)
my Makefile.am file:
bin_PROGRAMS = test
SUBDIRS = libsbml/src .
test_SOURCES = test.c
test_LDADD = libsbml/src/libsbml.la -lsbml -lstdc++ -lm
AM_CPPFLAGS = -Ilibsbml/include
my libsbml/src/Makefile.am
AUTOMAKE_OPTS = gnu
lib_LTLIBRARIES = libsbml.la
libsbml_la_SOURCES = common/libsbml-version.cpp math/ASTNode.cpp math/
FormulaTokenizer.c util/List.cpp
AM_CPPFLAGS = -I../include -lsbml -lstdc++ -lm