Open wangqiangcc opened 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.
Also, idk why but the dll generated is extremely big. about 100+MB.
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)