Closed MVoz closed 5 years ago
Hi, on which platform was this? If you're on Debian/Ubuntu, just run: sudo apt-get install libavl-dev. On Windows (using MinGW gcc) I used the sources from this link: http://ftp.debian.org/debian/pool/main/liba/libavl/libavl_0.3.5.orig.tar.gz
$ make
cc -O2 -fomit-frame-pointer -pipe -mcpu=i686 -w -c -o avl.o avl.c
cc.exe: warning: '-mcpu=' is deprecated; use '-mtune=' or '-march=' instead
cc -nostdlib -shared -Wl,-soname,libavl.so.1 avl.o -o libavl.so.1.5 -lc
E:/tools/vcpkg/downloads/tools/msys2/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.1.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lc
collect2.exe: error: ld returned 1 exit status
make: *** [GNUmakefile:37: libavl.so.1.5] Ошибка 1
I see now you are using MinGW-w64 on MSYS2, just like me. Here's how I do it:
gcc -O2 -fomit-frame-pointer -pipe -w -c -o avl.o avl.c && ar rcs libavl.a avl.o && gcc -shared -s -Wl,-soname,libavl.dll avl.o -o libavl.dll && pexports -o libavl.dll > libavl.def && dlltool --def libavl.def --dllname libavl.dll --output-lib libavl.dll.a && echo Installing in build/ && mkdir -p build/include build/lib build/bin && sed -e "s/\(avl_node_t \*new\)/\1node/g" avl.h > build/include/avl.h && cp *.a build/lib/ && cp *.dll build/bin/ && echo Done
libavl build ok
copy libavl.a to avl.a
copy all /usr , /mingw32
make
gcc --static -s -o src/copypedeps.exe src/copypedeps.static.o libpedeps.a -lshlwapi -lavl
src/copypedeps.static.o: file not recognized: File format not recognized
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:110: src/copypedeps.exe] Ошибка 1
looks like your src/copypedeps.static.o file is not the correct format (maybe it has 0 size). try to build it again...
sorry ))
make clean
make
build ok
Thanks for the copypedeps.exe utility! the best I've met MSVC dumpbin.exe does not find all dependencies
$
make
hmm..