msys2 / mingw 缺少动态链接器库
msys2 / mingw missing dynamic linker library
我正在尝试构建 SpatiaLite in Msys2. The build goes well until it attempts to compile the examples. It throws an error because the linker cannot find the dynamic linker (dl) library。这是我应该 msys2/mingw 支持的东西吗?我是不是少了一个包裹?
我使用
构建 spatialite
./configure && make
这是compiler/linker输出
Making all in examples
make[2]: Entering directory '/home/myuser/libspatialite-4.3.0a/examples'
gcc -DHAVE_CONFIG_H -I. -I.. -I./../src/headers -g -O2 -MT demo1.o -MD -MP -MF .deps/demo1.Tpo -c -o demo1.o demo1.c
mv -f .deps/demo1.Tpo .deps/demo1.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -I./../src/headers -g -O2 -L../src -lspatialite -lm -o demo1.exe demo1.o -L/mingw32/lib -lxml2 -lz -llzma -liconv -lws2_32 -lfreexl -liconv -lproj -lz -lsqlite3 -L/mingw32/lib -lgeos_c
libtool: link: gcc -I./../src/headers -g -O2 -o .libs/demo1.exe demo1.o -L../src /home/myuser/libspatialite-4.3.0a/src/.libs/libspatialite.a -L/mingw32/lib -lpthread -ldl -lxml2 -llzma -lws2_32 -lfreexl -liconv -lproj -lz -lsqlite3 -lgeos_c
C:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -ldl
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:372: demo1.exe] Error 1
make[2]: Leaving directory '/home/myuser/libspatialite-4.3.0a/examples'
make[1]: *** [Makefile:473: all-recursive] Error 1
make[1]: Leaving directory '/home/myuser/libspatialite-4.3.0a'
make: *** [Makefile:380: all] Error 2
msys2 需要包 mingw-w64-dlfcn
,它提供 libdl.a
和 libdl.dll.a
更多详情here
我正在尝试构建 SpatiaLite in Msys2. The build goes well until it attempts to compile the examples. It throws an error because the linker cannot find the dynamic linker (dl) library。这是我应该 msys2/mingw 支持的东西吗?我是不是少了一个包裹?
我使用
构建 spatialite./configure && make
这是compiler/linker输出
Making all in examples
make[2]: Entering directory '/home/myuser/libspatialite-4.3.0a/examples'
gcc -DHAVE_CONFIG_H -I. -I.. -I./../src/headers -g -O2 -MT demo1.o -MD -MP -MF .deps/demo1.Tpo -c -o demo1.o demo1.c
mv -f .deps/demo1.Tpo .deps/demo1.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -I./../src/headers -g -O2 -L../src -lspatialite -lm -o demo1.exe demo1.o -L/mingw32/lib -lxml2 -lz -llzma -liconv -lws2_32 -lfreexl -liconv -lproj -lz -lsqlite3 -L/mingw32/lib -lgeos_c
libtool: link: gcc -I./../src/headers -g -O2 -o .libs/demo1.exe demo1.o -L../src /home/myuser/libspatialite-4.3.0a/src/.libs/libspatialite.a -L/mingw32/lib -lpthread -ldl -lxml2 -llzma -lws2_32 -lfreexl -liconv -lproj -lz -lsqlite3 -lgeos_c
C:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -ldl
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:372: demo1.exe] Error 1
make[2]: Leaving directory '/home/myuser/libspatialite-4.3.0a/examples'
make[1]: *** [Makefile:473: all-recursive] Error 1
make[1]: Leaving directory '/home/myuser/libspatialite-4.3.0a'
make: *** [Makefile:380: all] Error 2
msys2 需要包 mingw-w64-dlfcn
,它提供 libdl.a
和 libdl.dll.a
更多详情here