aria2 / aria2

aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
https://aria2.github.io/
GNU General Public License v2.0
36.05k stars 3.62k forks source link

hi, i want to compile aria2-release-1.34.0 dll with --enable-libaria2 but did not generate libaria2.dll #1209

Open wangqiangcc opened 6 years ago

wangqiangcc commented 6 years ago

Hi I want to compile aria2-release-1.34.0 dll with --enable-libaria2 but did not generate libaria2.dll.

What can I do to generate it?

Thks!

!/bin/bash

HOST=i686-w64-mingw32 PREFIX=/usr/i686-w64-mingw32

autoreconf -i && \ ./configure \ --host=$HOST \ --prefix=$PREFIX \ --without-included-gettext \ --disable-nls \ --with-libcares \ --without-gnutls \ --without-wintls \ --with-openssl \ --with-sqlite3 \ --without-libxml2 \ --with-libexpat \ --with-libz \ --without-libgmp \ --with-libssh2 \ --without-libgcrypt \ --without-libnettle \ --with-cppunit-prefix=$PREFIX \ --enable-libaria2 \ CPPFLAGS="-I$PREFIX/include" \ LDFLAGS="-L$PREFIX/lib" \ PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig" && \ make -j$(nproc)

cqjjjzr commented 6 years ago

You can try run x86_64-w64-mingw32-g++ -shared -o libaria2.dll *.o -Wl,--export-all-symbols,--output-def,libaria2.def command in /src/.lib directory,

but you need to add all the lib used in aria2 to the command, so I used x86_64-w64-mingw32-g++ -shared -mwindows -o libaria2.dll *.o -Wl,--export-all-symbols,--output-def,libaria2.def -lwsock32 -lgdi32 -lwinmm -liphlpapi -lpsapi -lxml2 -lsqlite3 -lpthread -lsecur32 -lssh2 -L/usr/local/x86_64-w64-mingw32/lib -lz -lbcrypt -lcrypt32 -lcares -lws2_32 -L../../deps/wslay/lib/.libs -lwslay, your version may be different.

cqjjjzr commented 6 years ago

Also, idk why but the dll generated is extremely big. about 100+MB.