在Linux上找到Win exe所需的DLL(与mingw交叉编译)? [英] Finding DLLs required of a Win exe on Linux (cross-compiled with mingw)?

查看:141
本文介绍了在Linux上找到Win exe所需的DLL(与mingw交叉编译)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Linux上使用MinGW交叉编译到Windows.得到那个工作是轻而易举的.但是,将其与所需的DLL打包在一起并不是那么简单.目前的解决方案是在Windows上运行可执行文件,并通过DLL复制直到其实际运行.

是否有用于Linux的工具,该工具列出了Windows .exe所需的DLL? (类似于ldd和DependencyWalker的组合.)

解决方案

截至2015年末,没有工具链实用程序支持列出Windows二进制文件(例如ldd或otool)的动态依赖项.

从我的测试中,通常可以看到类似以下内容的完整依赖项列表:

strings MY.EXE | grep -i '\.dll$'

有点古怪,但它一直对我有用.

有关完整示例,请尝试此脚本我在Linux上的跨环境中使用. /p>

I'm using MinGW on Linux to cross-compile to Windows. Getting that working was a breeze. Packing it up with the required DLLs was not quite as simple though. The solution at the moment is to run the executable on Windows and copy over DLLs until it actually runs.

Is there a tool for Linux that lists the DLLs required by my Windows .exe? (Something like a combination of ldd and DependencyWalker.)

解决方案

As of Late 2015 there are no toolchain utilities that support listing dynamic dependencies for windows binaries (such as ldd or otool).

From my tests, a complete dependency list can usually be seen with something like:

strings MY.EXE | grep -i '\.dll$'

Hackish, but it has always worked for me.

For a complete example, try this script I use in my cross environment on linux.

这篇关于在Linux上找到Win exe所需的DLL(与mingw交叉编译)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆