Autotools(LIBTOOL)构建无法向共享库添加符号。这是postgis,请在Automake文件下面找到。
AR = ar rs
CC = @CC@
LIBLWGEOM_LDFLAGS = ../../liblwgeom/.libs/liblwgeom.lcona
LIBLWGEOM_CFLAGS = -I../../liblwgeom
LIBGDAL_CFLAGS = @LIBGDAL_CFLAGS@
LIBGDAL_LDFLAGS = @LIBGDAL_LDFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@ -lgeos_c
PROJ_LDFLAGS = @PROJ_LDFLAGS@ -lproj
LDFLAGS = $(LIBLWGEOM_LDFLAGS) $(LIBGDAL_LDFLAGS) $(PROJ_LDFLAGS) $(GEOS_LDFLAGS)
CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ $(LIBLWGEOM_CFLAGS) $(LIBGDAL_CFLAGS) @PROJ_CPPFLAGS@ @GEOS_CPPFLAGS@
top_builddir = @top_builddir@
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
includedir = @includedir@
SHELL = @SHELL@
INSTALL = $(SHELL) ../install-sh
LIBTOOL = @LIBTOOL@
SOVER = @POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@.@POSTGIS_MICRO_VERSION@
# Standalone RTCORE objects
RT_OBJS = \
rt_util.o \
rt_spatial_relationship.o \
rt_mapalgebra.o \
rt_geometry.o \
rt_statistics.o \
rt_pixel.o \
rt_warp.o \
rt_band.o \
rt_raster.o \
rt_serialize.o \
rt_wkb.o \
rt_context.o
RT_LIB = librtcore.la
RT_HEADERS = \
rt_serialize.h \
librtcore.h \
librtcore_internal.h \
../raster_config.h
LT_RT_OBJS = $(RT_OBJ:.o=.lo)
LT_OBJ = $(LT_RT_OBJ)
all: librtcore.la
install: install-librtcore
uninstall: uninstall-librtcore
install-librtcore: librtcore.la
$(LIBTOOL) --mode=install $(INSTALL) librtcore.la "$(DESTDIR)$(libdir)/librtcore.la"
$(INSTALL) librtcore.h "$(DESTDIR)$(includedir)/librtcore.h"
unisntall-librtcore:
$(LIBTOOL) --mode-uninstall rm -f "$(DESTDIR)$(libdir)/liblrtcore.la"
librtcore.la: $(LT_RT_OBJS)
$(LIBTOOL) --tag=CC --mode=link $(CC) -rpath $(libdir) $(LT_RT_OBJS) -release $(SOVER) $(LDFLAGS) -o $@
$(LT_RT_OBJS): %.lo : %.c
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<
clean:
rm -f $(RT_OBJS)
rm -f $(RT_LIB)
rm -f librtcore.la
rm -rf .libs
distclean: clean
rm -f Makefile
尝试链接共享库时,出现以下错误
对“rtdealloc”的未定义引用这是我第一次使用autotools。
答案 0 :(得分:0)
rtdealloc历史上在模块rt_context.c中定义。您是否从您的来源遗漏了这个文件?我没有在目标文件中看到它。