Reputation: 37
I've gotten the libaria2.a from msys2(pacman -S mingw-w64-x86_64-aria2).
And try to build its example code in ./examples
g++ -Wall -O2 -g -std=c++11 -o aria2ex libaria2ex.cc -L. -laria2 -lz -lws2_32 -lsqlite3 -lcares -lssh2 -lssl -lcrypto -lxml2 -lintl -I.
the example binary can be generated and works well. But when I try to use it in VS2022, the compiler reports
undefined symbol "int __cdecl aria2::libraryInit(void)" (?libraryInit@aria2@@YAHXZ)
Who knows how to fix this problem?
Thank you very much!
Upvotes: 0
Views: 10