gpt4 book ai didi

c - Autotools库中没有符号

转载 作者:行者123 更新时间:2023-11-30 17:13:36 24 4
gpt4 key购买 nike

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”的 undefined reference 这是我第一次使用自动工具。

最佳答案

rtdealloc 历史上是在模块 rt_context.c 中定义的。您是否从源中丢失了此文件?我没有看到它在目标文件中列出。

关于c - Autotools库中没有符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30714576/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com