LINUX.ORG.RU

Проблема с компилированием библиотеки на cygwin


0

0

Есть библиотека https://libmpq.org/ для работы с mpq-архивами и питоновский интерфейс к ней (https://libmpq.org/browser/libmpq/trunk/python?rev=221).

У меня Win7(дада). Скомпилировал библиотеку через cygwin (configure, make, make install). В C:\cygwin\usr\local\lib получил libmpq.a libmpq.la, а libmpq.so нет

libmpq.a - это, насколько я понимаю, статическая библиотека? но она не работает через питоновскую обертку

import ctypes

libmpq = ctypes.CDLL(«libmpq.a»)

Traceback (most recent call last): File «C:\Users\Admin\Desktop\Maps\extract_galaxy_scripts.py», line 5, in <module>

libmpq = ctypes.CDLL(«libmpq.a»)

File «C:\dev\Python26\lib\ctypes\__init__.py», line 353, in __init__

self._handle = _dlopen(self._name, mode)

WindowsError: [Error 193] %1 не является приложением Win32

В общем мне нужно получить работающую на винде библиотеку libmpq.so, чтобы она работала в указанной выше питоновской обертке. А мои познания в этом деле закончились на «configure, make, make install» =( Уже не знаю что делать.



Последнее исправление: hnorgist (всего исправлений: 5)

У тебя по дефолту сборка статической либы.

Нужно сделать что-типо

./configure --enable-shared
Или костыльно:
export LDFLAGS="${LDFLAGS} -shared"
./configure && make && make install

Kosyak ★★★★
()
Ответ на: комментарий от Kosyak

--enable-shared стоит по дефолту. а второй вариант не работает:

checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-cygwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... 
configure: error: in `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2':
configure: error: cannon run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log for more details'

hnorgist
() автор топика

Полный лог установки:

1. bash autogen.sh

Generating build information using aclocal, autoheader, automake and autoconf
This may take a while ...
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: You should add the contents of the following files to `aclocal.m4':
libtoolize:   `/usr/share/aclocal/libtool.m4'
libtoolize:   `/usr/share/aclocal/ltoptions.m4'
libtoolize:   `/usr/share/aclocal/ltversion.m4'
libtoolize:   `/usr/share/aclocal/ltsugar.m4'
libtoolize:   `/usr/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
Now you are ready to run ./configure
#!/bin/sh
#
echo "Generating build information using aclocal, autoheader, automake and autoconf"
echo "This may take a while ..."

# Touch the timestamps on all the files since CVS messes them up
directory=`dirname $0`
touch $directory/configure.ac

# Regenerate configuration files
libtoolize --copy
aclocal
autoheader
automake --foreign --add-missing --copy
autoconf

# Run configure for this platform
#./configure $*
echo "Now you are ready to run ./configure"

hnorgist
() автор топика
Ответ на: комментарий от hnorgist

2. ./configure --enable-shared

checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-cygwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 8192
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-cygwin paths to i686-pc-cygwin format... func_noop_path_convert
checking for /usr/i686-pc-cygwin/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/i686-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for inflateEnd in -lz... yes
checking bzlib.h usability... yes
checking bzlib.h presence... yes
checking for bzlib.h... yes
checking for BZ2_bzDecompressInit in -lbz2... yes
checking for a Python interpreter with version >= 2.4... python
checking for python... /usr/bin/python
checking for python version... 2.5
checking for python platform... cygwin
checking for python script directory... ${prefix}/lib/python2.5/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.5/site-packages
configure: creating ./config.status
config.status: creating libmpq.pc
config.status: creating libmpq-config
config.status: creating Makefile
config.status: creating libmpq/Makefile
config.status: creating bindings/Makefile
config.status: creating bindings/d/Makefile
config.status: creating bindings/python/Makefile
config.status: creating doc/Makefile
config.status: creating doc/man1/Makefile
config.status: creating doc/man3/Makefile
config.status: creating tools/Makefile
config.status: creating config.h
config.status: executing libtool commands

hnorgist
() автор топика
Ответ на: комментарий от hnorgist

3. make

make  all-recursive
make[1]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2'
Making all in libmpq
make[2]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/libmpq'
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -c -o common.lo common.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -c common.c  -DDLL_EXPORT -DPIC -o .libs/common.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -c common.c -o common.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -c -o huffman.lo huffman.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -c huffman.c  -DDLL_EXPORT -DPIC -o .libs/huffman.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -c huffman.c -o huffman.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -c -o extract.lo extract.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -c extract.c  -DDLL_EXPORT -DPIC -o .libs/extract.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -c extract.c -o extract.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -c -o explode.lo explode.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -c explode.c  -DDLL_EXPORT -DPIC -o .libs/explode.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -c explode.c -o explode.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -c -o mpq.lo mpq.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -c mpq.c  -DDLL_EXPORT -DPIC -o .libs/mpq.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -c mpq.c -o mpq.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -c -o wave.lo wave.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -c wave.c  -DDLL_EXPORT -DPIC -o .libs/wave.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -c wave.c -o wave.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC   --mode=link gcc  -g -O2 -release 0.4.2  -o libmpq.la -rpath /usr/local/lib common.lo huffman.lo extract.lo explode.lo mpq.lo wave.lo  -lbz2 -lz 
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries
libtool: link: ar cru .libs/libmpq.a  common.o huffman.o extract.o explode.o mpq.o wave.o
libtool: link: ranlib .libs/libmpq.a
libtool: link: ( cd ".libs" && rm -f "libmpq.la" && ln -s "../libmpq.la" "libmpq.la" )
make[2]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/libmpq'
Making all in bindings
make[2]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings'
Making all in d
make[3]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings/d'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings/d'
Making all in python
make[3]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings/python'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings/python'
make[3]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings'
make[2]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings'
Making all in doc
make[2]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc'
Making all in man1
make[3]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc/man1'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc/man1'
Making all in man3
make[3]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc/man3'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc/man3'
make[3]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc'
make[2]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc'
make[2]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2'
make[2]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2'
make[1]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2'
смущает
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries

hnorgist
() автор топика
Ответ на: комментарий от hnorgist

4. make install

Making install in libmpq
make[1]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/libmpq'
make[2]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/libmpq'
test -z "/usr/local/lib" || /usr/bin/mkdir -p "/usr/local/lib"
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libmpq.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libmpq.lai /usr/local/lib/libmpq.la
libtool: install: /usr/bin/install -c .libs/libmpq.a /usr/local/lib/libmpq.a
libtool: install: chmod 644 /usr/local/lib/libmpq.a
libtool: install: ranlib /usr/local/lib/libmpq.a
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-LLIBDIR' linker flag

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/include/libmpq" || /usr/bin/mkdir -p "/usr/local/include/libmpq"
 /usr/bin/install -c -m 644 mpq.h '/usr/local/include/libmpq'
make[2]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/libmpq'
make[1]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/libmpq'
Making install in bindings
make[1]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings'
Making install in d
make[2]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings/d'
make[3]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings/d'
make[3]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/include/d" || /usr/bin/mkdir -p "/usr/local/include/d"
 /usr/bin/install -c -m 644 mpq.d '/usr/local/include/d'
make[3]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings/d'
make[2]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings/d'
Making install in python
make[2]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings/python'
make[3]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings/python'
make[3]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/lib/python2.5/site-packages" || /usr/bin/mkdir -p "/usr/local/lib/python2.5/site-packages"
 /usr/bin/install -c -m 644 mpq.py '/usr/local/lib/python2.5/site-packages'
Byte-compiling python modules...
mpq.py
Byte-compiling python modules (optimized versions) ...
mpq.py
make[3]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings/python'
make[2]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings/python'
make[2]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings'
make[3]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings'
make[2]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings'
make[1]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/bindings'
Making install in doc
make[1]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc'
Making install in man1
make[2]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc/man1'
make[3]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc/man1'
make[3]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/share/man/man1" || /usr/bin/mkdir -p "/usr/local/share/man/man1"
 /usr/bin/install -c -m 644 libmpq-config.1 '/usr/local/share/man/man1'
make[3]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc/man1'
make[2]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc/man1'
Making install in man3
make[2]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc/man3'
make[3]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc/man3'
make[3]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/share/man/man3" || /usr/bin/mkdir -p "/usr/local/share/man/man3"
 /usr/bin/install -c -m 644 libmpq.3 libmpq__archive_close.3 libmpq__archive_files.3 libmpq__archive_offset.3 libmpq__archive_open.3 libmpq__archive_packed_size.3 libmpq__archive_unpacked_size.3 libmpq__archive_version.3 libmpq__block_close_offset.3 libmpq__block_open_offset.3 libmpq__block_read.3 libmpq__block_unpacked_size.3 libmpq__file_blocks.3 libmpq__file_compressed.3 libmpq__file_encrypted.3 libmpq__file_imploded.3 libmpq__file_number.3 libmpq__file_offset.3 libmpq__file_packed_size.3 libmpq__file_read.3 libmpq__file_unpacked_size.3 libmpq__version.3 '/usr/local/share/man/man3'
make[3]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc/man3'
make[2]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc/man3'
make[2]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc'
make[3]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc'
make[2]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc'
make[1]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2/doc'
make[1]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2'
make[2]: Entering directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2'
test -z "/usr/local/bin" || /usr/bin/mkdir -p "/usr/local/bin"
 /usr/bin/install -c libmpq-config '/usr/local/bin'
test -z "/usr/local/lib/pkgconfig" || /usr/bin/mkdir -p "/usr/local/lib/pkgconfig"
 /usr/bin/install -c -m 644 libmpq.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2'
make[1]: Leaving directory `/cygdrive/C/Users/Admin/Desktop/mpq_0.4.2'
Помогите мужики, я не шарю в чем проблема

hnorgist
() автор топика
Ответ на: комментарий от Yareg

Да это я, похоже, ошибся - устанавливал LDFLAGS до ./configure и ./configure до конца не выполнялся (почему-то.. неважно).

Потестировал установку LDFLAGS через ./libmpq/Makefile.am :

1.

libmpq_la_LDFLAGS = -release $(PACKAGE_VERSION)
Это по умолчанию, и соответственно на этапе make выдается предупреждение, как и писал выше
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries
В /usr/local/lib копируются libmpq.a и libmpq.la а динамической библиотеки нет

2.

libmpq_la_LDFLAGS = -release $(PACKAGE_VERSION) -shared
Все абсолютно то же самое.

3.

libmpq_la_LDFLAGS = -release $(PACKAGE_VERSION) -no-undefined
вычитал про -no-undefined тут. Варнинга нет, в C:\cygwin\usr\local\lib копируется кроме тех двух еще и libmpq.dll.a(что это за зверь). А в .\mpq_0.4.2\libmpq\.libs создается еще и cygmpq-0-4-2.dll но он тоже нерабочий, при попытке обернуть в питон (libmpq = ctypes.CDLL(«cygmpq-0-4-2.dll»)) - вешает процесс.

В общем, насколько я понял, undefined symbols - это проблема линковщика под виндой? А "-no-undefined" игнорит эти undefined symbols?

Цитата с http://www.cygwin.com/ml/cygwin/2007-06/msg00448.html :

DLLs are not SOs.  DLLs must resolve all symbols at link time.  That's why
Windows has the concept of export libraries.  See MSDN documentation for
a discussion of this.  So essentially, you'll need to have one or more
export libraries with stubs to the missing symbols in them.  List them
when compiling your plugin.  That will resolve the issue.
Так почему берутся эти unresolved symbols под сигвином? И как-нибудь это можно исправить?

hnorgist
() автор топика
Ответ на: комментарий от hnorgist

В винде принципиально нельзя слинковать dll'ку с unresolved symbols. А в линухе можно. Хотя когда так делают, то получаем мину замедленного действия, ибо могут возникать падения на ровном месте в неожиданных местах.

Reset ★★★★★
()
Ответ на: комментарий от hnorgist

Попробовать руками gcc -shared вызвать.

Reset ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.