我正在尝试在Windows上编译Xapian(我知道这是我的第一个问题,可惜我无法为此获得Linux环境)。 我已经安装了msys2,并且正在尝试使用MinGw64对其进行编译,我可以使它构建一个静态的.a文件。但是.so或.dll文件相当难以捉摸。我从lib工具收到以下警告。
*** Warning: linker path does not have real file for library -lz.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libz and none of the candidates passed a file format test
*** using a file magic. Last file checked: C:/Tools/msys64/mingw64/lib/libz.dll.a
*** Warning: linker path does not have real file for library -lrpcrt4.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with librpcrt4 and none of the candidates passed a file format test
*** using a file magic. Last file checked: C:/Tools/msys64/mingw64/x86_64-w64-mingw32/lib/librpcrt4.dll
*** Warning: linker path does not have real file for library -lws2_32.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libws2_32 and none of the candidates passed a file format test
*** using a file magic. Last file checked: C:/Tools/msys64/mingw64/x86_64-w64-mingw32/lib/libws2_32.dll
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
我尝试确保Windows目录中存在.dll,而bin目录中存在libz1.dll。我尝试从Windows目录中复制.dll并将其重命名为要拾取的搜索路径。我专门指出了libz.dll.a,而不是使用-lz选项。我尝试修补Libtool,以将dos程序视为可执行文件,而不仅仅是Windows编译的库。我知道这是一个漫长的过程,但是有人可以给我指向另一个方向的任何提示都很棒! 预先谢谢你:)